Ruby on Rails

Validates uniqueness of has_many relationship in Ruby on Rails