[Rails] Re: How do you use :message with validation?

Jean-etienne Durand
Thu, 20 Jul 2006 09:34:51 -0000

Ben Lisbakken wrote:
> If I do validates_uniqueness_of :name, :message => "It''s
not
> uniqueeee!!!"
>
> then how do I have it display that message when the check fails?
>
> -Ben Lisbakken

Ben,

You need to use flash messages in your views:
http://rubyonrails.org/api/classes/ActionController/Flash.html

- Jean-Etienne