> 
> The reason that your approach doesn't work is that you're still
> calling validates_uniqueness_of on your class. This is telling it,
> "from now on, check uniqueness of this column any time the record is
> saved". In effect, it's no different from just putting that code
> directly in the class body.
> 
> You can use the :if option:
> 
> class ModelName
>   validates_uniqueness_of :email, :if => proc { |model| 
> model.new_record? }
> end

Thanks Resolved .. worked like a charm .. :)

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

Reply via email to