lib/cassandra_object/dirty.rb in gotime-cassandra_object-2.6.3 vs lib/cassandra_object/dirty.rb in gotime-cassandra_object-2.6.4
- old
+ new
@@ -28,13 +28,15 @@
end
end
def write_attribute(name, value)
name = name.to_s
- unless attribute_changed?(name)
- old = read_attribute(name)
- changed_attributes[name] = old if old != value
- end
+ old = read_attribute(name)
+
super
+
+ unless attribute_changed?(name) || old == read_attribute(name)
+ changed_attributes[name] = old
+ end
end
end
end