blob: 695c2caaab9c803ab474bf1293e26ce5f9e07cbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
|