Currently having trouble with the validate_uniqueness_of method on my model with a given scope.
Right now I have 3 tables: User, College, UsersColleges (join between user and college)
User has_many :users_colleges
College has_many :users_colleges
UsersColleges belongs_to :user, :college
Right now, I am validating the uniqueness of the user_colleges, so that a user can only have 1 entry of the specified college.
validates_uniqueness_of :college_id, scope: :user_id
However, when updating my user with specific colleges, the validation fails -- College has been taken.
This behavior only happens for specific colleges, and I can't seem to figure out why.