This is a very common piece of code
&开发者_如何学JAVAlt;% form_for :blah... do |f| %>
<%= f.error_messages %>
First name: <%= f.text_field :first_name %><br />
....
<% end %>
error_messages
is a helper method but I am having a hard time finding the documentation for it, why is that?
I found them here: error_messages have same params as error_messages_for.
In Rails 3 however, error_messages and error_messages_for have been deprecated and have been moved out to a plugin.
精彩评论