我可以在 Rails 中做这样的事情吗?
module Authored
belongs_to :user
attr_accessible creation_date
end
class Line < ActiveRecord::Base
include Authored
end
class Document < ActiveRecord::Base
include Authored
end
class User < ActiveRecord::Base
has_many :creations, :class_name => 'Authored'
end
或者我是否需要使用简单的继承,即使我的 Authored 类具有不同的类层次结构?