diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-27 16:46:24 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-27 16:46:24 -0300 |
commit | 53f6c6d24e6fb25a62144c6ef5020cc04a893f56 (patch) | |
tree | fd39e81dc4c0944a89e2afa7c75e0c828d633527 /activerecord/lib/active_record | |
parent | e204f80dbb2134867b006d02c4d5d15c265351b8 (diff) | |
download | rails-53f6c6d24e6fb25a62144c6ef5020cc04a893f56.tar.gz rails-53f6c6d24e6fb25a62144c6ef5020cc04a893f56.tar.bz2 rails-53f6c6d24e6fb25a62144c6ef5020cc04a893f56.zip |
Performance: Don't reload ARel relation on update.
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 4e2261d044..2fc7b1e9c6 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2869,7 +2869,7 @@ module ActiveRecord #:nodoc: def update(attribute_names = @attributes.keys) attributes_with_values = arel_attributes_values(false, false, attribute_names) return 0 if attributes_with_values.empty? - self.class.arel_table(self.class.table_name, true).conditions(self.class.arel_table[self.class.primary_key].eq(id)).update(attributes_with_values) + self.class.arel_table(self.class.table_name).conditions(self.class.arel_table[self.class.primary_key].eq(id)).update(attributes_with_values) end # Creates a record with values matching those of the instance attributes |