Sha256: ecb95321c5ddfedb8fa394318172b89f9c0cf935dc8a5449d1a1043a7409cdb6

Contents?: true

Size: 686 Bytes

Versions: 3

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    # Controller that shows a simple dashboard.
    #
    class DashboardController < Decidim::Admin::ApplicationController
      authorize_resource :admin_dashboard, class: false

      helper_method :latest_action_logs

      private

      def latest_action_logs
        @latest_action_logs ||= Decidim::ActionLog
                                .where(organization: current_organization)
                                .includes(:participatory_space, :user, :resource, :component, :version)
                                .order(created_at: :desc)
                                .first(20)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-admin-0.11.2 app/controllers/decidim/admin/dashboard_controller.rb
decidim-admin-0.11.1 app/controllers/decidim/admin/dashboard_controller.rb
decidim-admin-0.11.0.pre1 app/controllers/decidim/admin/dashboard_controller.rb