Module: Opinio::OpinioSubjectum::ClassMethods
- Defined in:
- lib/opinio/opinio_subjectum.rb
Instance Method Summary collapse
Instance Method Details
#opinio_subjectum(*args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/opinio/opinio_subjectum.rb', line 9 def opinio_subjectum(*args) = args. has_many :comments, :class_name => Opinio.model_name, :as => :commentable, :order => .reverse_merge(:order => "created_at #{Opinio.sort_order}")[:order], :dependent => :destroy send :include, Opinio::OpinioSubjectum::InstanceMethods end |