0
验证关联模型的属性的最简单方法是什么?验证关联模型的特定属性
Item
belongs_to :user
validates_presence_of :user
# AND the "is_photographer" column for that user must be true
User
has_many :items
# can be a regular user or a photographer
太棒了。在4分钟内允许标记为正确。 – brittohalloran