Topic: model errors

cant seem to get the <%=error messages for 'model'%> construct to display model errors.

Any ides out there will be much a[ppreciated.


Re: model errors

Make sure to put the correct name of the model in there. So if the model was called User it would be:

<%= error_messages_for :user %>

This would look for an instance variable called @user, so make sure that is set and the error messages are in there. Lastly, make sure you are rendering this view when the validation fails - not redirecting as that will remove any validation error messages.

Railscasts - Free Ruby on Rails Screencasts

Re: model errors

thanx ryan.. wil try it out and see what happens