Module: Lazy::Commentable::Finders
- Defined in:
- lib/commentable.rb
Instance Method Summary collapse
Instance Method Details
#for_subject(subject) ⇒ Object
11 12 13 |
# File 'lib/commentable.rb', line 11 def for_subject(subject) where(commentable_type: subject.class.base_class.to_s, commentable_id: subject.id) end |
#for_topic(topic) ⇒ Object
15 16 17 |
# File 'lib/commentable.rb', line 15 def for_topic(topic) where(topic: topic) end |