aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-12-20 07:55:10 -0800
committerXavier Noria <fxn@hashref.com>2011-12-20 07:55:10 -0800
commit737960d92e833d37922296aa789a59de6b7d0533 (patch)
tree35c2b42e95f0d89cc647a50c5bb5ea26fd0ebf9f
parent3f92e5e40720bd3c00935b2df42d9c781248b9e7 (diff)
downloadrails-737960d92e833d37922296aa789a59de6b7d0533.tar.gz
rails-737960d92e833d37922296aa789a59de6b7d0533.tar.bz2
rails-737960d92e833d37922296aa789a59de6b7d0533.zip
removes some unnecessary selfs
-rw-r--r--activerecord/lib/active_record/persistence.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index 038355deaa..bf4f97b03b 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -209,7 +209,7 @@ module ActiveRecord
# The following transaction covers any possible database side-effects of the
# attributes assignment. For example, setting the IDs of a child collection.
with_transaction_returning_status do
- self.assign_attributes(attributes, options)
+ assign_attributes(attributes, options)
save
end
end
@@ -220,7 +220,7 @@ module ActiveRecord
# The following transaction covers any possible database side-effects of the
# attributes assignment. For example, setting the IDs of a child collection.
with_transaction_returning_status do
- self.assign_attributes(attributes, options)
+ assign_attributes(attributes, options)
save!
end
end
@@ -285,7 +285,7 @@ module ActiveRecord
clear_association_cache
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'))
end