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/.