module Decidim::Loggable

A concern that adds logging capability to the given model. Including this allows `Decidim::ActionLog` instances related to this class to properly render.

We encourage you to overwrite the `log_presenter_class_for` class method to return your custom presenter for the given log type.

Example:

class MyModel < ApplicationRecord
  include Decidim::Loggable
end

Public Instance Methods

log_presenter_class_for(_log) click to toggle source

Public: Finds the presenter class for the given log type.

log - a symbol representing the log type.

Returns a Class.

# File lib/decidim/loggable.rb, line 27
def log_presenter_class_for(_log)
  Decidim::Log::BasePresenter
end