skill-assessment-app/app/controllers/admin/dashboard_controller.rb
2016-09-22 16:29:19 -05:00

28 lines
529 B
Ruby

# frozen_string_literal: true
module Admin
class DashboardController < AdminController
def show
authorize :dashboard
send "redirect_for_#{current_user.role}"
end
private
def redirect_for_admin
redirect_to admin_users_url
end
def redirect_for_manager
redirect_to admin_quizzes_url
end
def redirect_for_reviewer
redirect_to admin_results_url
end
def redirect_for_recruiter
redirect_to admin_candidates_url
end
end
end