mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Performance: Don't reload the arel_table when destroying.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user