Method: ResourceController::Actions#update

Defined in:
lib/resource_controller/actions.rb

#updateObject



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/resource_controller/actions.rb', line 33

def update
  load_object
  before :update
  if object.update_attributes object_params
    after :update
    set_flash :update
    response_for :update
  else
    after :update_fails
    set_flash :update_fails
    response_for :update_fails
  end
end