Module: Mori::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mori/controller.rb
Instance Method Summary collapse
- #authenticate! ⇒ Object
- #current_user ⇒ Object
- #signed_in? ⇒ Boolean
- #user_params ⇒ Object
- #warden ⇒ Object
Instance Method Details
#authenticate! ⇒ Object
9 10 11 |
# File 'lib/mori/controller.rb', line 9 def authenticate! warden.authenticate! end |
#current_user ⇒ Object
17 18 19 |
# File 'lib/mori/controller.rb', line 17 def current_user warden.user end |
#signed_in? ⇒ Boolean
13 14 15 |
# File 'lib/mori/controller.rb', line 13 def signed_in? current_user.present? end |
#user_params ⇒ Object
25 26 27 28 |
# File 'lib/mori/controller.rb', line 25 def user_params user = params[:user] user if user.present? end |
#warden ⇒ Object
21 22 23 |
# File 'lib/mori/controller.rb', line 21 def warden env['warden'] end |