Rails 3: How not to include column's name in a validation message without plugins ?

Posted by Misha Moroshko on Stack Overflow See other posts from Stack Overflow or by Misha Moroshko
Published on 2010-12-27T12:45:44Z Indexed on 2010/12/27 13:54 UTC
Read the original article Hit count: 210

I have the following validation:

validates_presence_of :price, :message => "my message"

and I get the following error when the price is blank:

Price my message

Is there a way not to include the column name (price) in the message ?

I tried to do:

validates_presence_of :price, :message => "^ my message"

as suggested here, but it didn't work for me. I got the following message:

Price ^ my message

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about validation