Module: Make::Commentable::ClassMethods

Defined in:
lib/make_commentable/commentable_methods.rb

Instance Method Summary collapse

Instance Method Details

#make_commentable(options = {}) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/make_commentable/commentable_methods.rb', line 13

def make_commentable(options={})
  has_many :comments, {:as => :commentable}.merge(options)
  accepts_nested_attributes_for :comments, :allow_destroy => true

  #include Commentable::InstanceMethods
  #extend Commentable::SingletonMethods
end