Module: Commentable

Extended by:
ActiveSupport::Concern
Included in:
Batch, Request, Study
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


29
30
31
32
33
# File 'app/models/concerns/commentable.rb', line 29

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