Sha256: 7a4abd537b83e14880e5227419c5ba84c8c7ce6448a7f4fea51fc778f40bfe9a

Contents?: true

Size: 684 Bytes

Versions: 2

Compression:

Stored size: 684 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, :feature, :version)
                                .order(created_at: :desc)
                                .first(20)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-admin-0.10.1 app/controllers/decidim/admin/dashboard_controller.rb
decidim-admin-0.10.0 app/controllers/decidim/admin/dashboard_controller.rb