From 4e13625818579551c01640cb405a8c22a3bd0e68 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Wed, 22 Dec 2010 10:11:27 +0000 Subject: Test demonstrating problem with foo.association_ids where it's a has_many :through with :conditions, with a belongs_to as the source reflection --- .../test/cases/associations/has_many_through_associations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord') diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index dfb3292502..ad67886202 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -529,4 +529,8 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase author = authors(:david) assert_equal ['body'], author.comments.select('comments.body').first.attributes.keys end + + def test_get_has_many_through_belongs_to_ids_with_conditions + assert_equal [categories(:general).id], authors(:mary).categories_like_general_ids + end end -- cgit v1.2.3