Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails error_messages helper

This is a very common piece of code

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

like image 223
Bob Avatar asked Dec 04 '25 19:12

Bob


1 Answers

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.

like image 189
morgan freeman Avatar answered Dec 06 '25 11:12

morgan freeman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!