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