Class: Genkan::SessionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/genkan/sessions_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



13
14
15
16
17
18
# File 'app/controllers/genkan/sessions_controller.rb', line 13

def create
  user.login!
  create_session
  create_encrypted_cookie
  redirect_to referer_or_root_path, notice: t('genkan.sessions.logged_in')
end

#destroyObject



24
25
26
27
# File 'app/controllers/genkan/sessions_controller.rb', line 24

def destroy
  destroy_session
  redirect_to genkan., notice: t('genkan.sessions.logged_out')
end

#failureObject



20
21
22
# File 'app/controllers/genkan/sessions_controller.rb', line 20

def failure
  redirect_to genkan., alert: t('genkan.sessions.failure')
end

#newObject



11
# File 'app/controllers/genkan/sessions_controller.rb', line 11

def new; end