简体   繁体   中英

Hide Rails Errors in production

How can i hide application errors in production mode and stop hem from showing to the users?

I want errors like this one not to show;

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" %>

In general you can define rescue_from statements in your application controller to rescue from exceptions and render error pages. This post gives an example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM