diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-05 02:30:30 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-05 02:30:30 +0000 |
commit | a5fded3e88147769f4461d36bd60764ebcb95bc3 (patch) | |
tree | 31ddd850ee02af19e7d409cb2628cb12bccbe546 /activerecord/test | |
parent | 0aec2423edbfa0a1fa99ae868273b3e9b29581d2 (diff) | |
download | rails-a5fded3e88147769f4461d36bd60764ebcb95bc3.tar.gz rails-a5fded3e88147769f4461d36bd60764ebcb95bc3.tar.bz2 rails-a5fded3e88147769f4461d36bd60764ebcb95bc3.zip |
Fix that options[:from] table names should never be quoted [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/associations/eager_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/associations/eager_test.rb b/activerecord/test/associations/eager_test.rb index 75948ab59f..048f13b8b2 100644 --- a/activerecord/test/associations/eager_test.rb +++ b/activerecord/test/associations/eager_test.rb @@ -37,6 +37,17 @@ class EagerAssociationTest < Test::Unit::TestCase end end + def test_with_two_tables_in_from_without_getting_double_quoted + posts = Post.find(:all, + :select => "posts.*", + :from => "posts, authors", + :include => :comments, + :conditions => "posts.author_id = authors.id" + ) + + assert_equal 2, posts.first.comments.size + end + def test_loading_with_multiple_associations posts = Post.find(:all, :include => [ :comments, :author, :categories ], :order => "posts.id") assert_equal 2, posts.first.comments.size |