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