Module: Hyrax::Admin::StatsBehavior

Extended by:
ActiveSupport::Concern
Included in:
StatsController
Defined in:
app/controllers/concerns/hyrax/admin/stats_behavior.rb

Instance Method Summary collapse

Instance Method Details

#showObject



9
10
11
12
13
14
15
16
17
# File 'app/controllers/concerns/hyrax/admin/stats_behavior.rb', line 9

def show
  authorize! :read, Hyrax::Statistics
  stats_filters = params.fetch(:stats_filters, {})
  limit = params.fetch(:limit, "5").to_i
  @presenter = AdminStatsPresenter.new(stats_filters, limit)
  add_breadcrumb t(:'hyrax.controls.home'), root_path
  add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path
  add_breadcrumb t(:'hyrax.admin.sidebar.statistics'), hyrax.admin_stats_path
end