Can I do somehting like this in 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
Or do I need to use simple inheritance, even if my Authored classes have different class hierarchies ?
For more info on
ActiveSupport::Concern, http://api.rubyonrails.org/classes/ActiveSupport/Concern.html