Caching

ramontayag edited this page May 8, 2011 · 2 revisions

The dynamic attributes are only actually saved when save is called on the record that has them.

@user.add_dynamic_attribute(:gunslinger, "boolean")
@user.add_dynamic_attribute(:middle_name, "string")
@user.write_dynamic_attribute :gunslinger, true
@user.middle_name = "Unknown"
@user.save # the respective dynamic attribute records are written in the dynamic_attributes table