I have a 2 models Game & Theme and they have a has_and_belongs_to_many association. I have tried many solutions to prevent duplicate records in
Game
Theme
To run validations on join table you should use has_many :through association instead. http://guides.rubyonrails.org/association_basics.html#the-has-many-through-association
has_many :through