I have a table that contains several fields that must be initialized
when first created, but may not be altered afterwards (when updating the
other fields) because they can be changed by external processes.
I noticed that the ActiveRecord update commands (even update_attribute)
only seem to work by loading the complete record, changing fields that
need to be changed and doing a full update of all (even unchanged)
fields. I know it is only a matter of milliseconds between read/update,
but I don’t like to take any unneeded risks.
I found a workaround by overriding update_attributes in my model as
I’m wondering though if there isn’t a better way to accomplish this and
I also got a gut-feeling the above will somehow screw up something else
but I can’t put a finger on it (and am probably overlooking the
Any bright ideas/suggestions ?
Thanks in advance!