Skip to content
Browse files

Added signed_in_as_admin? as helper method.

Signed-off-by: Jerry Richardson <jerry@jerryr.com>
  • Loading branch information...
1 parent 40d9710 commit d668cb851750521181254709a042d4662ab41f1e @dmauldin dmauldin committed with jerry Feb 12, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 app/controllers/application.rb
View
2 app/controllers/application.rb
@@ -13,6 +13,8 @@ class ApplicationController < ActionController::Base
# from your application log (in this case, all fields with names like "password").
filter_parameter_logging :password
+ helper_method :signed_in_as_admin?
+
def signed_in_as_admin?
signed_in? && current_user.admin?
end

0 comments on commit d668cb8

Please sign in to comment.
Something went wrong with that request. Please try again.