Module: TraqHasComments::Commentable

Extended by:
ActiveSupport::Concern
Defined in:
lib/traq_has_comments/commentable.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods, SingletonMethods

Instance Method Summary collapse

Instance Method Details

#has_commentsObject



8
9
10
11
12
13
14
15
# File 'lib/traq_has_comments/commentable.rb', line 8

def has_comments

  has_many :comments, as: :commentable, class_name: 'TraqHasComments::Comment'

  extend ClassMethods
  extend SingletonMethods
  include InstanceMethods
end