diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb index e8b7dca..8449926 100644 --- a/app/controllers/admin/application_controller.rb +++ b/app/controllers/admin/application_controller.rb @@ -18,10 +18,6 @@ def authorize_user end def authorize_action?(resource, action) - Rails.logger.info '================ Checking papers...' - Rails.logger.info "=== Confirming #{action} on #{resource}" - Rails.logger.info "=== Result: #{can? action, resource}" - can? action, resource end diff --git a/app/controllers/admin/stats_controller.rb b/app/controllers/admin/stats_controller.rb deleted file mode 100644 index dc139dc..0000000 --- a/app/controllers/admin/stats_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -module Admin - class StatsController < Admin::ApplicationController - def index - @stats = { - term_count: Term.count, - search_event_count: SearchEvent.count, - } - end - end -end diff --git a/app/dashboards/stat_dashboard.rb b/app/dashboards/stat_dashboard.rb deleted file mode 100644 index d455329..0000000 --- a/app/dashboards/stat_dashboard.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'administrate/custom_dashboard' - -class StatDashboard < Administrate::CustomDashboard - resource "Overview" -end diff --git a/app/models/ability.rb b/app/models/ability.rb index 4dd69cf..407b086 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -10,8 +10,6 @@ def initialize(user) return unless user.present? # Rules will go here. - can :index, StatDashboard - return unless user.admin? can :manage, :all end diff --git a/app/views/admin/stats/index.html.erb b/app/views/admin/stats/index.html.erb deleted file mode 100644 index 35fbd36..0000000 --- a/app/views/admin/stats/index.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -
-

TACOS overview

-
- -
-

Search activity

-

There are <%= number_with_delimiter(@stats[:term_count]) %> unique terms.

-

These terms have been received as part of <%= number_with_delimiter(@stats[:search_event_count]) %> search events.

-
diff --git a/app/views/layouts/_site_nav.html.erb b/app/views/layouts/_site_nav.html.erb index 9f966c1..a777138 100644 --- a/app/views/layouts/_site_nav.html.erb +++ b/app/views/layouts/_site_nav.html.erb @@ -10,7 +10,7 @@