Class: CafeCar::SessionsController
- Inherits:
-
Object
- Object
- CafeCar::SessionsController
- Includes:
- Controller
- Defined in:
- app/controllers/cafe_car/sessions_controller.rb
Constant Summary
Constants included from Controller
Constants included from Controller::Filtering
Controller::Filtering::CONTROL_PARAMS
Instance Method Summary collapse
Methods included from Controller
#batch, #collection_action, #edit, #index, #member_action, #new, #options, #respond_with, #show, #update
Instance Method Details
#create ⇒ Object
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 |
#destroy ⇒ Object
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 |