lib/cfoundry/v2/model.rb in cfoundry-IronFoundry-0.3.34 vs lib/cfoundry/v2/model.rb in cfoundry-IronFoundry-0.3.39

- old
+ new

@@ -149,11 +149,11 @@ ["v2", "#{object_name}s", @guid, plural, x.guid], nil => :json) } define_method(:"#{plural}=") { |xs| - Model.validate_type(x, [CFoundry::V2.const_get(kls)]) + Model.validate_type(xs, [CFoundry::V2.const_get(kls)]) @manifest ||= {} @manifest[:entity] ||= {} @manifest[:entity][:"#{singular}_guids"] = @diff[:"#{singular}_guids"] = xs.collect(&:guid) @@ -225,10 +225,12 @@ @diff.clear true end - def update!(diff = @diff) + def update!(diff = {}) + diff = @diff.merge(diff) + @manifest = @client.base.send(:"update_#{object_name}", @guid, diff) @diff.clear if diff == @diff true