lib/couchrest/model/properties.rb in couchrest_model-2.0.0.beta vs lib/couchrest/model/properties.rb in couchrest_model-2.0.0.beta2

- old
+ new

@@ -38,10 +38,10 @@ # Store a casted value in the current instance of an attribute defined # with a property and update dirty status def write_attribute(property, value) prop = find_property!(property) - value = prop.is_a?(String) ? value : prop.cast(self, value) + value = prop.cast(self, value) couchrest_attribute_will_change!(prop.name) if use_dirty? && self[prop.name] != value self[prop.name] = value end # Takes a hash as argument, and applies the values by using writer methods