lib/azeroth/request_handler/update.rb in azeroth-0.3.0 vs lib/azeroth/request_handler/update.rb in azeroth-0.4.0
- old
+ new
@@ -18,9 +18,12 @@
# @return [Object]
def resource
@resource ||= update_resource
end
+ # 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)