lib/reviewed/request.rb in reviewed-0.7.1 vs lib/reviewed/request.rb in reviewed-0.8.0

- old
+ new

@@ -32,15 +32,10 @@ # Convenience Method def all where({}) end - def object_from_response(method, url, params={}) - response = client.send(method, url, params.merge(cache_control_params)) - resource.new(response.body) - end - def cached? !uncached? end def uncached? @@ -53,9 +48,14 @@ end def with_new_cache @reset_cache = true self + end + + def object_from_response(method, url, params={}) + response = client.send(method, url, params.merge(cache_control_params)) + resource.new(response.body, client) end def collection_from_response(method, url, params={}) response = client.send(method, url, params.merge(cache_control_params)) Reviewed::Collection.new(client, resource, response, params)