我想知道如何在我的模型中拥有各种属性。例如:
Property < ActiveRecord::Base
locatable, saleable ...
这些会是mixin吗?还是有另一种实现方式?例如。设计的方式有:
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end