Module: Commontator::ActsAsCommontator::ClassMethods
- Defined in:
- lib/commontator/acts_as_commontator.rb
Instance Method Summary collapse
- #acts_as_commontator(options = {}) ⇒ Object (also: #acts_as_commonter, #acts_as_commentator, #acts_as_commenter)
Instance Method Details
#acts_as_commontator(options = {}) ⇒ Object Also known as: acts_as_commonter, acts_as_commentator, acts_as_commenter
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/commontator/acts_as_commontator.rb', line 10 def acts_as_commontator( = {}) class_eval do has_many :comments, :as => :commontator, :class_name => 'Commontator::Comment' has_many :subscriptions, :as => :subscriber, :class_name => 'Commontator::Subscription', :dependent => :destroy cattr_accessor :commontator_config self.commontator_config = Commontator::CommontatorConfig.new() self.is_commontator = true end end |