instance method
init_changed_attributes
Ruby on Rails 4.0.13
Since v4.0.13 Last seen in v4.0.13 PrivateSignature
init_changed_attributes()
No documentation comment.
Source
# File activerecord/lib/active_record/core.rb, line 457
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
Defined in activerecord/lib/active_record/core.rb line 457
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Core