Class: CurrentUser::SessionsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  user = ::User.find params[:user_id]
   user
  redirect_to 
  erase_stored_location
end

#destroyObject



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

def destroy
  new
  render :new
end

#newObject



7
8
9
10
# File 'app/controllers/current_user/sessions_controller.rb', line 7

def new
  sign_out
  @users = users
end