diff options
author | Brandon Keepers <brandon@collectiveidea.com> | 2008-06-09 11:30:48 -0400 |
---|---|---|
committer | rick <technoweenie@gmail.com> | 2008-06-09 12:05:20 -0400 |
commit | e94e53f9cd70bee69759661e9771da3fe0ee9554 (patch) | |
tree | ebd08651543a0c28ce6ce0ef6d8a0bc9bf7c4430 /activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | |
parent | 8bf74c30fe276606214850ae2de76fe0efb08d94 (diff) | |
download | rails-e94e53f9cd70bee69759661e9771da3fe0ee9554.tar.gz rails-e94e53f9cd70bee69759661e9771da3fe0ee9554.tar.bz2 rails-e94e53f9cd70bee69759661e9771da3fe0ee9554.zip |
fix eager loading with dynamic finders
Diffstat (limited to 'activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb index 294b993c55..b29df68d22 100644 --- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb @@ -681,4 +681,10 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase assert_equal developer, project.developers.find(:first) assert_equal project, developer.projects.find(:first) end + + def test_dynamic_find_should_respect_association_include + # SQL error in sort clause if :include is not included + # due to Unknown column 'authors.id' + assert Category.find(1).posts_with_authors_sorted_by_author_id.find_by_title('Welcome to the weblog') + end end |