diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2005-12-20 20:32:47 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2005-12-20 20:32:47 +0000 |
commit | 1d2c6ee8f3f7e4b6881f30e6b53582738c2b3ace (patch) | |
tree | 2928e565d896bfd8e0e0f8cb3829a8c4a012359a /activerecord/test/associations_join_model_test.rb | |
parent | 1235d26bfbc99a7b7466bddb8ff69eecc585d27f (diff) | |
download | rails-1d2c6ee8f3f7e4b6881f30e6b53582738c2b3ace.tar.gz rails-1d2c6ee8f3f7e4b6881f30e6b53582738c2b3ace.tar.bz2 rails-1d2c6ee8f3f7e4b6881f30e6b53582738c2b3ace.zip |
added :piggyback option to has_many :through relationships to pick up values from the join table as needed
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/associations_join_model_test.rb')
-rw-r--r-- | activerecord/test/associations_join_model_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/associations_join_model_test.rb b/activerecord/test/associations_join_model_test.rb index d53a8d98d3..502e4d28c5 100644 --- a/activerecord/test/associations_join_model_test.rb +++ b/activerecord/test/associations_join_model_test.rb @@ -38,5 +38,9 @@ class AssociationsJoinModelTest < Test::Unit::TestCase def test_polymorphic_has_many_going_through_join_model_with_inheritance assert_equal tags(:general), posts(:thinking).tags.first end + + def test_has_many_with_piggyback + assert_equal "2", categories(:sti_test).authors.first.post_id + end end |