instance method
reload
Ruby on Rails 5.2.8.1
Since v5.2.8.1Signature
reload(*)
reload the record and clears changed attributes.
Parameters
-
argsrest
Source
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 30
def reload(*)
super.tap do
@previously_changed = ActiveSupport::HashWithIndifferentAccess.new
@mutations_before_last_save = nil
@attributes_changed_by_setter = ActiveSupport::HashWithIndifferentAccess.new
@mutations_from_database = nil
end
end
Defined in activerecord/lib/active_record/attribute_methods/dirty.rb line 30
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::Dirty