summaryrefslogtreecommitdiff
path: root/app/controllers/admin/dashboard_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/dashboard_controller.rb')
-rw-r--r--app/controllers/admin/dashboard_controller.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb
new file mode 100644
index 0000000..695c2ca
--- /dev/null
+++ b/app/controllers/admin/dashboard_controller.rb
@@ -0,0 +1,13 @@
+class Admin::DashboardController < ApplicationController
+ def index
+ @tartiflettes = Tartiflette.includes(:scores)
+ end
+
+ private
+
+ def require_admin
+ unless logged_in? && current_user.admin?
+ redirect_to root_path, alert: "Access denied."
+ end
+ end
+end
Copyright 2019--2025 Marius PETER