From 3f17ed407c5d61bc01fd59776205486c2350f36e Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Wed, 22 Dec 2010 11:45:37 +0000 Subject: Test to verify that #2189 (count with has_many :through and a named_scope) is fixed --- activerecord/test/models/category.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/models/category.rb') diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb index 48415846dd..06908ea85e 100644 --- a/activerecord/test/models/category.rb +++ b/activerecord/test/models/category.rb @@ -23,6 +23,8 @@ class Category < ActiveRecord::Base has_many :categorizations has_many :authors, :through => :categorizations, :select => 'authors.*, categorizations.post_id' + + scope :general, :conditions => { :name => 'General' } end class SpecialCategory < Category -- cgit v1.2.3 From d90b4e2615e8048fdeffc6dffe3246704adee01f Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Wed, 23 Feb 2011 00:17:01 +0000 Subject: Rewrote AssociationPreload. --- activerecord/test/models/category.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/test/models/category.rb') diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb index 06908ea85e..8f37433ec6 100644 --- a/activerecord/test/models/category.rb +++ b/activerecord/test/models/category.rb @@ -22,7 +22,8 @@ class Category < ActiveRecord::Base end has_many :categorizations - has_many :authors, :through => :categorizations, :select => 'authors.*, categorizations.post_id' + has_many :authors, :through => :categorizations + has_many :authors_with_select, :through => :categorizations, :source => :author, :select => 'authors.*, categorizations.post_id' scope :general, :conditions => { :name => 'General' } end -- cgit v1.2.3