Validation for HABTM is not working, I used the following code:
Class GroupsUsers < ActiveRecord::Base
belongs_to :user
belongs_to :group
validates_uniqueness_of :user_id, :scope => :group_id
end
Does anyone have a solution as to why this is not working?