From e1286862979e34c430a0bbbdf784a7503393aaab Mon Sep 17 00:00:00 2001 From: nilsding Date: Thu, 27 Nov 2014 11:50:10 +0100 Subject: [PATCH] added privileged? helper --- app/helpers/application_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fe10b635..80b666e4 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -45,4 +45,12 @@ module ApplicationHelper return nil unless count.count > 0 count.count end + + def privileged? + if current_user && current_user.admin? + true + else + false + end + end end