Hi, I am developing an application in rails 3.0 I have post Model class Post < ActiveRecord::Base validates :name , :presence => true end
I have added the presence of validation on post name. It shows me error that "Name can't be blank" I have to give the custom message for the user so I have written like as follows:- class Post < ActiveRecord::Base validates :name , :presence => true , :message=>"Post name can't be blank." end But it is giving me error:- "Unknown validator: 'message'" Can anyone tell me How to give the custom message in rails 3 model validations? Thanks, Mike -- 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.

