I\'m wondering if there is something at work here that I don\'t understand or if I\'ve run into a bug in ActiveRecord (4.1.1).
I have a database full of records with
will_change!
You can also use:
test.json_data_will_change! # Goes before the save.
This will tell ActiveModel that the attribute, json_data
, has changed (i.e. it's dirty ← there's a joke there somewhere) and will update the value properly on save.
See Rails is not saving an attribute that is changed for some more details as well.