error_messages

At: Getting Started with Rails — Ruby on Rails Guides

Under: 7.4 Generating a Controller

In the following:

<%= form_for([@post, @post.comments.build]) do |f| %> <%= f.error_messages %>

What is: <%= f.error_messages %>

Is it displaying an error message? But, what and where is the error message displayed? And, how can we customize it?

Thanks.

Have a look at rails error_messages - Google Search

Colin

clanlaw wrote:

clanlaw wrote:

>> Is it displaying an error message? But, what and where is the error >> message displayed? And, how can we customize it?

> Have a look athttp://www.google.co.uk/search?&q=rails+error_messages

> Colin

I can google it, but most of the results show error_messages_for.

That's ok - they're basically the same. error_messages is just the form_for version of error_messages_for.

Fred

Frederick Cheung wrote: