It''s done.
Should be written
validates_uniqueness_of :email, :scope=>:address, :message=>"your
error message"
On Jun 21, 4:12 pm, mrbless
<mrbl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Guys I have a model say Contacts and it has following attributes
> id,email and address
> Now I want to store only those tuple whose email as well as address
> attributes are unique.
> I have tried this one
> validates_uniqueness_of :email && :address
>
> but it doesn''t work. So asking for help
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---