Class: Tramway::Auth::Web::SessionsController
- Inherits:
-
ApplicationController
- Object
- Core::ApplicationController
- ApplicationController
- ApplicationController
- Tramway::Auth::Web::SessionsController
- Defined in:
- app/controllers/tramway/auth/web/sessions_controller.rb
Instance Method Summary collapse
Methods included from Tramway::AuthManagement
#authenticate_admin!, #authenticate_user!, #current_user, #sign_in, #sign_out, #signed_in?
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/tramway/auth/web/sessions_controller.rb', line 13 def create @session_form = ::Tramway::Auth::SessionForm.new ::Tramway::User::User.active.find_or_initialize_by email: params[:user][:email] if @session_form.validate params[:user] sign_in @session_form.model redirect_to ::Tramway::Auth.root_path else render :new end end |