Module: SimplyCommentable::Base::ClassMethods

Defined in:
lib/simply_commentable/base.rb

Instance Method Summary collapse

Instance Method Details

#simply_commentableObject



16
17
18
19
20
21
22
23
# File 'lib/simply_commentable/base.rb', line 16

def simply_commentable

	has_many :comments, 
		:as => :commentable, 
		:dependent => :destroy, 
		:order => 'created_at ASC'

end

#simply_commentable_commenterObject



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

def simply_commentable_commenter

	has_many :comments, 
		:as => :commenter, 
		:dependent => :destroy, 
		:order => 'created_at ASC'

end