lib/dynabix/metadata.rb in dynabix-0.3.0 vs lib/dynabix/metadata.rb in dynabix-0.3.1
- old
+ new
@@ -135,9 +135,11 @@
end
end
def create_writer(serializer, attr)
define_method("#{attr}=".to_sym) do |value|
+ # mark this attribute as dirty because AR will not mark serializers of nested models dirty
+ self.send("#{serializer}_will_change!")
self[serializer][attr.to_sym] = value
end
end
end