aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-19 17:07:56 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-19 17:07:56 +0000
commit190e04645bf7ae873d922064783a71a88e0060fd (patch)
treedc2dcd1068dab32fc6a08e45e55673af13601043 /activerecord/test/fixtures
parentb3fcf2fa3c55584c6cb23d2195fbdc2647cc84cd (diff)
downloadrails-190e04645bf7ae873d922064783a71a88e0060fd.tar.gz
rails-190e04645bf7ae873d922064783a71a88e0060fd.tar.bz2
rails-190e04645bf7ae873d922064783a71a88e0060fd.zip
Fixed that :delete_sql in has_and_belongs_to_many associations couldn't access record properties #1299 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1313 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r--activerecord/test/fixtures/project.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/project.rb b/activerecord/test/fixtures/project.rb
index fddea7b61c..89d5c36db8 100644
--- a/activerecord/test/fixtures/project.rb
+++ b/activerecord/test/fixtures/project.rb
@@ -1,6 +1,7 @@
class Project < ActiveRecord::Base
has_and_belongs_to_many :developers, :uniq => true
has_and_belongs_to_many :developers_named_david, :class_name => "Developer", :conditions => "name = 'David'", :uniq => true
+ has_and_belongs_to_many :developers_by_sql, :class_name => "Developer", :delete_sql => "DELETE FROM developers_projects WHERE project_id = \#{id} AND developer_id = \#{record.id}"
end
class SpecialProject < Project