lib/restful_resource/base.rb in restful_resource-0.8.7 vs lib/restful_resource/base.rb in restful_resource-0.8.8

- old
+ new

@@ -36,11 +36,13 @@ response = http.get(collection_url(params)) RestfulResource::OpenObject.new(parse_json(response.body)) end def self.put(id, data: {}, **params) - response = http.put(member_url(id, params), data) + url = member_url(id, params) + + response = http.put(url, data: data) self.new(parse_json(response.body)) end def self.all self.where @@ -69,19 +71,19 @@ @base_authorization end private def self.merge_url_paths(uri, *paths) - uri.merge(paths.compact.join('/')).to_s + uri.merge(paths.compact.join('/')).to_s end def self.member_url(id, params) url = merge_url_paths(superclass.base_url, @resource_path, id, @action_prefix) replace_parameters(url, params) end def self.collection_url(params) - url = merge_url_paths(superclass.base_url, @resource_path, @action_prefix) + url = merge_url_paths(superclass.base_url, @resource_path, @action_prefix) replace_parameters(url, params) end def self.new_collection(json) json.map do |element|