Class: My::DriversController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/ship/my/drivers_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



19
20
21
# File 'app/controllers/ship/my/drivers_controller.rb', line 19

def destroy
  @driver.destroy
end

#editObject



8
9
# File 'app/controllers/ship/my/drivers_controller.rb', line 8

def edit
end

#showObject



5
6
# File 'app/controllers/ship/my/drivers_controller.rb', line 5

def show
end

#updateObject



11
12
13
14
15
16
17
# File 'app/controllers/ship/my/drivers_controller.rb', line 11

def update
  @driver.assign_attributes(driver_params)

  unless @driver.save
    render :edit, locals: { model: @driver }, status: :unprocessable_entity
  end
end