You could alway store them in known order so that
sender.id <= reciver.id
and use scoped validates_uniqueness_of.

Assuming that sender and reciver can be exchanged in this relationship
and does not have any additional meaning.

Like 'friendship' when it does not matter who is friend A and who is
friend B

Robert Pankowecki

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