Module: Decidim::Plans::Traceable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/decidim/plans/traceable.rb
Overview
A concern that adds traceabilty capability to the given model. Including this allows you the keep track of changes in the model attributes and changes authorship.
Example:
class MyModel < ApplicationRecord
include Decidim::Plans::Traceable
end
Instance Method Summary collapse
-
#is_a?(klass) ⇒ Boolean
This is needed for the action logs to work properly.
Instance Method Details
#is_a?(klass) ⇒ Boolean
This is needed for the action logs to work properly. They are only stored against models that implement Decidim::Traceable. However, we cannot directly include that module because we want to modify its functionality.
42 43 44 45 |
# File 'app/models/concerns/decidim/plans/traceable.rb', line 42 def is_a?(klass) return true if klass == Decidim::Traceable super end |