From 17650e394fae26984d506fd0f705bc32e5a5de27 Mon Sep 17 00:00:00 2001 From: Grant Ammons Date: Mon, 28 Jun 2010 16:37:38 -0400 Subject: Eager loading :through associations will join the :source model if there are :conditions. [#2362 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activerecord/test/models/post.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test/models/post.rb') diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index dd06822cfd..6c7b93be87 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -58,6 +58,7 @@ class Post < ActiveRecord::Base end end + has_many :misc_tags, :through => :taggings, :source => :tag, :conditions => "tags.name = 'Misc'" has_many :funky_tags, :through => :taggings, :source => :tag has_many :super_tags, :through => :taggings has_one :tagging, :as => :taggable -- cgit v1.2.3