Permalink
Browse files

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
  • Loading branch information...
1 parent 6e39c9e commit 9a10b31fe87710ba745db735f0c10365caa1eb5c @jeremy jeremy committed Jul 3, 2005
Showing with 4 additions and 5 deletions.
  1. +4 −5 activerecord/lib/active_record/base.rb
View
9 activerecord/lib/active_record/base.rb
@@ -962,11 +962,10 @@ def save
# 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

0 comments on commit 9a10b31

Please sign in to comment.