title: Unique constraint for a has_and_belongs_to_many constraint at the rails level
body: <p>I have created an index to ensure uniqueness for a has_and_belongs_to_many at the database level. How do I do the same at the rails level?</p>