On Feb 11, 12:51 pm, Mat Brown <[email protected]> wrote:
>
> class ModelName
>   validates_uniqueness_of :email, :if => proc { |model| model.new_record? }
> end

and in cases like this where you just want to call a method you can
do :if => :new_record?

Fred

-- 
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.

Reply via email to