added privileged? helper
This commit is contained in:
parent
8dff4462cf
commit
e128686297
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue