Module: TkhAuthenticationHelper::InstanceMethods
- Defined in:
- lib/tkh_authentication/tkh_authentication_helper.rb
Instance Method Summary collapse
-
#administrator? ⇒ Boolean
duplicated from action controller extension.
-
#current_user ⇒ Object
duplicated from action controller extension.
Instance Method Details
#administrator? ⇒ Boolean
duplicated from action controller extension. there must be a better way
15 16 17 |
# File 'lib/tkh_authentication/tkh_authentication_helper.rb', line 15 def administrator? @administrator ||= current_user && current_user.admin? end |
#current_user ⇒ Object
duplicated from action controller extension. there must be a better way
10 11 12 |
# File 'lib/tkh_authentication/tkh_authentication_helper.rb', line 10 def current_user @current_user ||= User.find_by!(auth_token: [:auth_token]) if [:auth_token] end |