Hello,

I'm have a form and the error messages are not being displayed properly

I got a remote_form_for and am trying to show errors like I always do:
<%= error_messages_for @user%>

but the output is:
4 errors prohibited this user from being saved

There were problems with the following fields:

    * {{attribute}} {{message}}
    * {{attribute}} {{message}}
    * {{attribute}} {{message}}
    * {{attribute}} {{message}}

When I use this method, the errors are being displayed correctly:
<% for error in @user.errors %>
  <%= '<font style="color:red">'+error[0]+' - '+error[1]+'</font><br>'
%>
<% end %>

Does anyone know why the error_messages_for does not work?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to