Module: Decidim::Admin::LogRenderHelper

Included in:
ApplicationHelper
Defined in:
app/helpers/decidim/admin/log_render_helper.rb

Overview

Helpers to render log entries.

Instance Method Summary collapse

Instance Method Details

#render_log(action_log, log_type = :admin_log) ⇒ Object

Renders the given ‘action_log`. See `Decidim::Loggable` for more info on how log presenters work.

action_log - An instance of ‘ActionLog` log_type - A symbol representing the log type

Returns an HTML-safe String.



15
16
17
18
# File 'app/helpers/decidim/admin/log_render_helper.rb', line 15

def render_log(action_log, log_type = :admin_log)
  presenter_klass = action_log.log_presenter_class_for(log_type)
  presenter_klass.new(action_log, self).present
end