Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Friendlier Error Messages
The default error messages can be a bit stale and off putting. Try somethings like this:
:header_message => "Oops - We couldn't save your user!",
:message => "The following fields were a bit of a problem:",
:header_tag => :h1
You can also use error_messages_for as follows
<% form_for do |f| %>
<%= f.error_messages :header_message => "..." %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment