aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-03-16 04:18:12 +0000
committerRick Olson <technoweenie@gmail.com>2006-03-16 04:18:12 +0000
commit02d34440cf0713479ec26332bcfc004f343685ab (patch)
tree157562a0c40407256a620609b69f19587507133f /activerecord/test
parent4e15bf787e80f3a7ad1d3fa31338eff2cfbdd920 (diff)
downloadrails-02d34440cf0713479ec26332bcfc004f343685ab.tar.gz
rails-02d34440cf0713479ec26332bcfc004f343685ab.tar.bz2
rails-02d34440cf0713479ec26332bcfc004f343685ab.zip
Alias the has_and_belongs_to_many join table on eager includes. closes #4106 [jeremyevans0@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/associations_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb
index c4c497575b..89d85bd567 100755
--- a/activerecord/test/associations_test.rb
+++ b/activerecord/test/associations_test.rb
@@ -1469,4 +1469,8 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
AND developer_id = #{developer.id}
end_sql
end
+
+ def test_join_table_alias
+ assert_equal 3, Developer.find(:all, :include => {:projects => :developers}, :conditions => 'join_project_developers.joined_on IS NOT NULL').size
+ end
end