lib/restful_resource/base.rb in restful_resource-0.8.5 vs lib/restful_resource/base.rb in restful_resource-0.8.6
- old
+ new
@@ -35,11 +35,12 @@
def self.get(params={})
response = http.get(collection_url(params))
RestfulResource::OpenObject.new(parse_json(response.body))
end
- def self.put(data: {}, **params)
- http.put(collection_url(params), data)
+ def self.put(id, data: {}, **params)
+ response = http.put(member_url(id, params), data)
+ self.new(parse_json(response.body))
end
def self.all
self.where
end