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
try this, just like string:
class User < ActiveRecord::Base has_many :things, :dependent => :destroy validates :things, length: {maximum: 4} end