lib/cfoundry/v2/model.rb in cfoundry-0.6.1.rc4 vs lib/cfoundry/v2/model.rb in cfoundry-0.7.0.rc1

- old
+ new

@@ -91,28 +91,36 @@ else payload[k] = v end end - @manifest = @client.base.send(:"create_#{object_name}", payload) + @manifest = @client.base.post("v2", plural_object_name, + :content => :json, + :accept => :json, + :payload => payload + ) @guid = @manifest[:metadata][:guid] @diff.clear true end def update! - @manifest = @client.base.send(:"update_#{object_name}", @guid, @diff) + @client.base.put("v2", plural_object_name, guid, + :content => :json, + :accept => :json, + :payload => @diff + ) @diff.clear true end def delete!(options = {}) - @client.base.send(:"delete_#{object_name}", @guid, options) + @client.base.delete("v2", plural_object_name, guid, :params => options) @guid = nil @diff.clear