method
init_changed_attributes
rails latest stable - Class:
ActiveRecord::Core
init_changed_attributes()private
No documentation available.
# File activerecord/lib/active_record/core.rb, line 448
def init_changed_attributes
# Intentionally avoid using #column_defaults since overridden defaults (as is done in
# optimistic locking) won't get written unless they get marked as changed
self.class.columns.each do |c|
attr, orig_value = c.name, c.default
@changed_attributes[attr] = orig_value if _field_changed?(attr, orig_value, @attributes[attr])
end
end