Module: Polemic::ActiveRecordExtension

Defined in:
lib/polemic/rails/active_record_extension.rb

Instance Method Summary collapse

Instance Method Details

#has_polemic(options = {}) ⇒ Object



3
4
5
6
7
# File 'lib/polemic/rails/active_record_extension.rb', line 3

def has_polemic(options = {})
  has_many :comments, :as => :commentable, :dependent => :destroy
  has_many :commentators, :through => :comments, :source => :user
  include Polemic::CommentableMethods
end