Module: HubIdentityRuby::ControllerHelpers
- Defined in:
- lib/hub_identity_ruby/controller_helpers.rb
Instance Method Summary collapse
Instance Method Details
#authenticate_user! ⇒ Object
4 5 6 |
# File 'lib/hub_identity_ruby/controller_helpers.rb', line 4 def authenticate_user! redirect_to hub_identity_ruby.sessions_new_path unless current_user? end |
#current_user? ⇒ Boolean
8 9 10 |
# File 'lib/hub_identity_ruby/controller_helpers.rb', line 8 def current_user? session[:current_user] end |
#set_current_user ⇒ Object
12 13 14 |
# File 'lib/hub_identity_ruby/controller_helpers.rb', line 12 def set_current_user @current_user = session[:current_user] end |