Class: Mori::SessionsController

Inherits:
MoriController
  • Object
show all
Defined in:
app/controllers/mori/sessions_controller.rb

Instance Method Summary collapse

Methods inherited from MoriController

#current_user, #warden

Instance Method Details

#createObject



8
9
10
11
# File 'app/controllers/mori/sessions_controller.rb', line 8

def create
  warden.authenticate!
  redirect_to Mori.configuration., notice: "You have logged in"
end

#destroyObject



13
14
15
16
# File 'app/controllers/mori/sessions_controller.rb', line 13

def destroy
  warden.logout
  redirect_to Mori.configuration.after_logout_url
end

#newObject



2
3
4
5
6
# File 'app/controllers/mori/sessions_controller.rb', line 2

def new
  redirect_to Mori.configuration. if current_user
  @user = Mori::User.new
  flash.now.alert = warden.message if warden.message.present?
end