Serialized Attributes and Dirty Flags

June 17th, 2008 by Jason Kroll

Well we seem to have upgraded to Rails 2.1, or at least the new ActiveRecord which runs with 2.1, and this new version is most uncooperative when it comes to saving records after modifying a serialized field. I have been told (by the notorious KenValet) that the dirty flag is not being set on modify but will be set on assignment, so calling ’save’ doesn’t actually save since as far as MySQL is concerned nothing has been modified. It’s not the sort of thing one expects, and a strange thing to put in an upgrade.

Subscribe to responses (RSS)

Leave a Reply