Class: CafeCar::SessionsController

Inherits:
Object
  • Object
show all
Includes:
Controller
Defined in:
app/controllers/cafe_car/sessions_controller.rb

Instance Method Summary collapse

Methods included from Controller

#edit, #index, #new, #respond_with, #show, #update

Instance Method Details

#createObject



12
13
14
15
# File 'app/controllers/cafe_car/sessions_controller.rb', line 12

def create
  run_callbacks(:create) { object.save! }
  respond_with object, location: after_authentication_url
end

#destroyObject



17
18
19
20
# File 'app/controllers/cafe_car/sessions_controller.rb', line 17

def destroy
  run_callbacks(:destroy) { object.destroy! }
  respond_with object, location: main_app.root_path
end