lib/azeroth/request_handler/update.rb in azeroth-0.6.5 vs lib/azeroth/request_handler/update.rb in azeroth-0.7.0
- old
+ new
@@ -22,13 +22,13 @@
# build resource for update
#
# @return [Object]
def update_resource
- attributes = controller.send("#{model.name}_params")
-
controller.send(model.name).tap do |entry|
- entry.update(attributes)
+ trigger_event(:save) do
+ entry.update(attributes)
+ end
end
end
# @private
#