lib/yao/resources/action.rb in yao-0.2.0 vs lib/yao/resources/action.rb in yao-0.2.1
- old
+ new
@@ -3,10 +3,10 @@
def action(id, query)
res = POST(action_path(id)) do |req|
req.body = query.to_json
req.headers['Content-Type'] = 'application/json'
end
- return_resource(res.body[resource_name_in_json])
+ return_resource(resource_from_json(res.body))
end
private
def action_path(id)
[resources_name, id, "action"].join("/")