lib/ridley/resource.rb in ridley-0.3.0 vs lib/ridley/resource.rb in ridley-0.3.1

- old
+ new

@@ -121,11 +121,11 @@ # # @return [Object] def create(connection, object) resource = new(connection, object.to_hash) new_attributes = connection.post(self.resource_path, resource.to_json).body - resource.attributes = resource.attributes.merge(new_attributes) + resource.attributes = resource.attributes.deep_merge(new_attributes) resource end # @param [Ridley::Connection] connection # @param [String, #chef_id] object @@ -174,10 +174,10 @@ # @param [Ridley::Connection] connection # @param [Hash] attributes def initialize(connection, attributes = {}) @connection = connection - self.attributes = self.class.attribute_defaults.merge(attributes) + self.attributes = self.class.attribute_defaults.deep_merge(attributes) end # @param [String, Symbol] key # # @return [Object]