aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/book.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-27 18:51:32 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-27 18:51:32 +0000
commit4b639904d7bc4407657767bb963997bc78678d03 (patch)
tree8819aed22cbcd90b7decee02639a275adbf01572 /activerecord/test/fixtures/book.rb
parentcf9be897b81b5cda0282fb3439c11af6032ecedb (diff)
downloadrails-4b639904d7bc4407657767bb963997bc78678d03.tar.gz
rails-4b639904d7bc4407657767bb963997bc78678d03.tar.bz2
rails-4b639904d7bc4407657767bb963997bc78678d03.zip
Fix has_many :through delete with custom foreign keys. Closes #6466.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/book.rb')
-rw-r--r--activerecord/test/fixtures/book.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/book.rb b/activerecord/test/fixtures/book.rb
new file mode 100644
index 0000000000..cfd07abddc
--- /dev/null
+++ b/activerecord/test/fixtures/book.rb
@@ -0,0 +1,4 @@
+class Book < ActiveRecord::Base
+ has_many :citations, :foreign_key => 'book1_id'
+ has_many :references, :through => :citations, :source => :reference_of, :uniq => true
+end