Sha256: 21bf47327dbe900ca4d73a64e5c9e8faba0cf642eac7e6f453a1d537c2fb62b7

Contents?: true

Size: 609 Bytes

Versions: 90

Compression:

Stored size: 609 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    # Helpers to render log entries.
    #
    module LogRenderHelper
      # 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.
      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
    end
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.28.4 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.27.9 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.29.0 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.28.3 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.27.8 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.29.0.rc4 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.29.0.rc3 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.29.0.rc2 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.29.0.rc1 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.28.2 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.27.7 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.28.1 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.27.6 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.26.10 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.26.9 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.28.0 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.27.5 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.28.0.rc5 app/helpers/decidim/admin/log_render_helper.rb
decidim-admin-0.28.0.rc4 app/helpers/decidim/admin/log_render_helper.rb