Sha256: f25844a92fbc6a9953be661a3badbbe990b137ad87b20c0516644759d92dd4b6

Contents?: true

Size: 667 Bytes

Versions: 61

Compression:

Stored size: 667 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    # Controller that shows a simple dashboard.
    #
    class LogsController < Decidim::Admin::ApplicationController
      helper_method :logs

      def index
        enforce_permission_to :read, :admin_log
      end

      private

      def logs
        @logs ||= Decidim::ActionLog
                  .where(organization: current_organization)
                  .includes(:participatory_space, :user, :resource, :component, :version)
                  .for_admin
                  .order(created_at: :desc)
                  .page(params[:page])
                  .per(20)
      end
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
decidim-admin-0.27.9 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.8 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.7 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.6 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.10 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.9 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.5 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.8 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.4 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.3 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.7 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.5 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.2 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.1 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.4 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.0 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.3 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.0.rc2 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.27.0.rc1 app/controllers/decidim/admin/logs_controller.rb
decidim-admin-0.26.2 app/controllers/decidim/admin/logs_controller.rb