aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-07-03 08:32:47 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-07-03 08:32:47 +0000
commit9a10b31fe87710ba745db735f0c10365caa1eb5c (patch)
treea68c4eb31cac6f80498cbe7e4c6985c3ff4bfa7b /activerecord
parent6e39c9e561f1fd925f3be6d18b8faf52336eb2dd (diff)
downloadrails-9a10b31fe87710ba745db735f0c10365caa1eb5c.tar.gz
rails-9a10b31fe87710ba745db735f0c10365caa1eb5c.tar.bz2
rails-9a10b31fe87710ba745db735f0c10365caa1eb5c.zip
r1615@asus: jeremy | 2005-07-03 08:06:00 -0700
oops, back out DELETE typo git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/lib/active_record/base.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 992303fc8f..0a844cc348 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -962,11 +962,10 @@ module ActiveRecord #:nodoc:
# be made (since they can't be persisted).
def destroy
unless new_record?
- connection.delete(
- "DELETE
- "WHERE #{self.class.primary_key} = #{quote(id)}",
- "#{self.class.name} Destroy"
- )
+ connection.delete <<-end_sql, "#{self.class.name} Destroy"
+ DELETE FROM #{self.class.table_name}
+ WHERE #{self.class.primary_key} = #{quoted_id}
+ end_sql
end
freeze