Class: PersonSessionsController
- Inherits:
-
Forgeos::ApplicationController
- Object
- ActionController::Base
- Forgeos::ApplicationController
- PersonSessionsController
- Defined in:
- app/controllers/person_sessions_controller.rb
Instance Method Summary collapse
Methods inherited from Forgeos::ApplicationController
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/person_sessions_controller.rb', line 6 def create @person_session = PersonSession.new(params[:person_session]) if @person_session.save redirect_to_stored_location(:root) flash[:notice] = t('log.in.success').capitalize else flash[:error] = t('log.in.failed').capitalize redirect_to_stored_location({:action => new}) end end |
#destroy ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/person_sessions_controller.rb', line 17 def destroy current_user_session.destroy flash[:notice] = I18n.t('log.out.success').capitalize redirect_to(:root) end |
#new ⇒ Object
2 3 4 |
# File 'app/controllers/person_sessions_controller.rb', line 2 def new @person_session = PersonSession.new end |