diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-27 16:30:48 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-27 16:30:48 -0300 |
commit | 1cc0ea826e92169575b486e662dff1e1d44db992 (patch) | |
tree | bac67eda8af948a32a04527e831c1cf25c6eb0aa /activerecord/lib/active_record | |
parent | d395391e1dfae4531671fbb09911e6b9418474ba (diff) | |
download | rails-1cc0ea826e92169575b486e662dff1e1d44db992.tar.gz rails-1cc0ea826e92169575b486e662dff1e1d44db992.tar.bz2 rails-1cc0ea826e92169575b486e662dff1e1d44db992.zip |
Performance: Don't reload the arel_table when destroying.
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 8217f5e8e9..0307aa29d3 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2572,7 +2572,7 @@ module ActiveRecord #:nodoc: # be made (since they can't be persisted). def destroy unless new_record? - self.class.arel_table(self.class.table_name, true).conditions(self.class.arel_table[self.class.primary_key].eq(id)).delete + self.class.arel_table(self.class.table_name).conditions(self.class.arel_table[self.class.primary_key].eq(id)).delete end @destroyed = true |