Permalink
Browse files

removes some unnecessary selfs

  • Loading branch information...
1 parent 3f92e5e commit 737960d92e833d37922296aa789a59de6b7d0533 @fxn fxn committed Dec 20, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/persistence.rb
@@ -209,7 +209,7 @@ def update_attributes(attributes, options = {})
# 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 @@ def update_attributes!(attributes, options = {})
# 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 @@ def reload(options = nil)
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

0 comments on commit 737960d

Please sign in to comment.