mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
removes some unnecessary selfs
This commit is contained in:
parent
3f92e5e407
commit
737960d92e
1 changed files with 3 additions and 3 deletions
|
@ -209,7 +209,7 @@ module ActiveRecord
|
||||||
# The following transaction covers any possible database side-effects of the
|
# The following transaction covers any possible database side-effects of the
|
||||||
# attributes assignment. For example, setting the IDs of a child collection.
|
# attributes assignment. For example, setting the IDs of a child collection.
|
||||||
with_transaction_returning_status do
|
with_transaction_returning_status do
|
||||||
self.assign_attributes(attributes, options)
|
assign_attributes(attributes, options)
|
||||||
save
|
save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -220,7 +220,7 @@ module ActiveRecord
|
||||||
# The following transaction covers any possible database side-effects of the
|
# The following transaction covers any possible database side-effects of the
|
||||||
# attributes assignment. For example, setting the IDs of a child collection.
|
# attributes assignment. For example, setting the IDs of a child collection.
|
||||||
with_transaction_returning_status do
|
with_transaction_returning_status do
|
||||||
self.assign_attributes(attributes, options)
|
assign_attributes(attributes, options)
|
||||||
save!
|
save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -285,7 +285,7 @@ module ActiveRecord
|
||||||
clear_association_cache
|
clear_association_cache
|
||||||
|
|
||||||
IdentityMap.without do
|
IdentityMap.without do
|
||||||
fresh_object = self.class.unscoped { self.class.find(self.id, options) }
|
fresh_object = self.class.unscoped { self.class.find(id, options) }
|
||||||
@attributes.update(fresh_object.instance_variable_get('@attributes'))
|
@attributes.update(fresh_object.instance_variable_get('@attributes'))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue