Class: UserSessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- UserSessionsController
- Defined in:
- app/controllers/user_sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/user_sessions_controller.rb', line 9 def create @user_session = UserSession.new(params[:user_session]) if @user_session.save flash[Rails.application.config.constellation.authentication.success_flash] = t("constellation.authentication.user_sessions.create.success_flash") redirect_back_or_default self.respond_to?(:signin_redirection) ? signin_redirection : Rails.application.config.constellation.authentication.signin_redirection else render :action => :new end end |
#destroy ⇒ Object
19 20 21 22 23 |
# File 'app/controllers/user_sessions_controller.rb', line 19 def destroy current_user_session.destroy flash[Rails.application.config.constellation.authentication.success_flash] = t("constellation.authentication.user_sessions.destroy.success_flash") redirect_to self.respond_to?(:signout_redirection) ? signout_redirection : Rails.application.config.constellation.authentication.signout_redirection end |
#new ⇒ Object
5 6 7 |
# File 'app/controllers/user_sessions_controller.rb', line 5 def new @user_session = UserSession.new end |