Module: Commentable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/commentable.rb
Overview
Classes including this module can have comments attached to them
Instance Method Summary collapse
Instance Method Details
#after_comment_addition(_comment) ⇒ Object
27 28 29 30 31 |
# File 'app/models/concerns/commentable.rb', line 27 def after_comment_addition(_comment) # Override this functionality in classes which include Commentable to customize behaviour # Can't use association callbacks, as need to support comments created directly eg. # Comment.create(description: 'This should work', commentable: plate) end |