diff options
author | Benjamin Floering <floering@ieee.org> | 2009-05-17 23:35:47 -0700 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-05-18 13:56:17 +0200 |
commit | 27de7f150b57a18d4ccdd274f6f8b621b58108c6 (patch) | |
tree | 266fe0c48b0920757c3e65fa44413c5426a85b7b /activerecord/test/cases/associations | |
parent | 49afe81a13a98d1878f2400bef11a7b89468dff0 (diff) | |
download | rails-27de7f150b57a18d4ccdd274f6f8b621b58108c6.tar.gz rails-27de7f150b57a18d4ccdd274f6f8b621b58108c6.tar.bz2 rails-27de7f150b57a18d4ccdd274f6f8b621b58108c6.zip |
Fixed limited eager loading associations with numbers in the name [#2668 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/eager_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb index d23f86b700..65049c4f87 100644 --- a/activerecord/test/cases/associations/eager_test.rb +++ b/activerecord/test/cases/associations/eager_test.rb @@ -589,6 +589,10 @@ class EagerAssociationTest < ActiveRecord::TestCase assert_equal posts(:sti_post_and_comments, :sti_comments), Post.find(:all, :include => [:author, :comments], :conditions => "authors.name = 'David'", :order => 'UPPER(posts.title) DESC, posts.id', :limit => 2, :offset => 1) end + def test_limited_eager_with_numeric_in_association + assert_equal people(:david, :susan), Person.find(:all, :include => [:readers, :primary_contact, :number1_fan], :conditions => "number1_fans_people.first_name like 'M%'", :order => 'readers.id', :limit => 2, :offset => 0) + end + def test_preload_with_interpolation assert_equal [comments(:greetings)], Post.find(posts(:welcome).id, :include => :comments_with_interpolated_conditions).comments_with_interpolated_conditions end |