From 5585583079c1b58d2d9c97c9ca69734fe294a81e Mon Sep 17 00:00:00 2001 From: Jonas Folvik Date: Fri, 1 Jan 2016 15:05:29 +0100 Subject: [PATCH] added some ranks Added lead_mod, trainingmod and developer in one file I missed last time --- app/controllers/application_controller.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a0e166e..d1ad4fe 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -16,6 +16,9 @@ class ApplicationController < ActionController::Base helper_method :admin? helper_method :superadmin? helper_method :donor? + helper_method :developer? + helper_method :trainingmod? + helper_method :lead_mod? helper_method :confirmed? @@ -71,6 +74,18 @@ class ApplicationController < ActionController::Base !!(current_user && current_user.donor?) end + def developer? + !!(current_user && current_user.developer?) + end + + def trainingmod? + !!(current_user && current_user.trainingmod?) + end + + def lead_mod? + !!(current_user && current_user.lead_mod?) + end + def confirmed? !!(current_user && current_user.confirmed?) end