[Rails] rails3 customized error message
In rails3 this is what I get.
validates_presence_of :subject
#=> subject can't be blank
validates_presence_of :subject, :message => "can't be empty"
#=> subject can't be empty
However What I want is
#=> Please enter title
even though the field name is "subject".
How do I do that in rails3?
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home