I would like to limit the number of items in an association. I want to ensure the User doesn\'t have more than X Things. This question was asked before and the solution had th
You should try this.
class Thing :create def thing_count user = User.find(id) errors.add(:base, "Exceeded thing limit") if user.things.count >= 5 end end