lib/cfoundry/v2/model.rb in cfoundry-0.3.20 vs lib/cfoundry/v2/model.rb in cfoundry-0.3.21

- old
+ new

@@ -1,5 +1,7 @@ +require "multi_json" + module CFoundry::V2 class Model class << self def defaults @defaults ||= {} @@ -153,11 +155,11 @@ else x end end elsif k.to_s.end_with?("_json") && v.is_a?(String) - payload[k] = JSON.parse(v) + payload[k] = MultiJson.load(v) elsif k.to_s.end_with?("_url") else payload[k] = v end end @@ -187,9 +189,11 @@ @diff.clear if @manifest @manifest.delete :metadata end + + true end def exists? @client.base.send(object_name, @guid) true