I'm new here. However, I'm so happy because I got Ruby on Rails to
work on my host. Now there's just a problem with displaying
validation error message ,
in my view i have used the form_tag code is as follow
The symbol (:content_masters) in error_messages_for should be the name of a variable, so if you wanted to display error messages for at variable called @user, you’d call it like this:
Thanks for your concern..
if i want to validate title than
<p>
<%= label_tag :title %>
<%= text_field_tag :title %>
</p>
then.............................
<%= error_messages_for @title %>
<%= error_messages_for :title %>
i have tried both the syntax but not working
Have a look at the rails guides at http://guides.rubyonrails.org/.
The getting started guide shows how to use form_for, which is better
than form_for in most cases, and includes display of error messages.
Also the guide on debugging shows ways of debugging your app if it is
not performing as expected. The other guides should be read also.