[英]Hide Rails Errors in production
如何在生產模式下隱藏應用程序錯誤並阻止下擺顯示給用戶?
我希望這樣的錯誤不顯示;
can't convert Symbol into Integer
5: <%= f.hidden_field :reset_password_token %>
6: <%= f.input :password, autofocus: true, placeholder: "Password" %>
7: <%= f.input :password_confirmation, label: false, placeholder: "Confirm Password" %>
8: <%= f.input :submit , "Change Password" %>
9: <% end %>
10:
11: <%= render "devise/shared/links" %>
通常,您可以在應用程序控制器中定義rescue_from
語句,以從異常中恢復並呈現錯誤頁面。 這篇文章給出了一個例子。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.