From b1257d96b7b2482fc7811e5dc12d71c9fa091d10 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 1 Sep 2006 05:31:56 +0000 Subject: has_many :through conditions are sanitized by the associating class. Closes #5971. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/author.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/fixtures/author.rb') diff --git a/activerecord/test/fixtures/author.rb b/activerecord/test/fixtures/author.rb index a9102a269a..1c49b90fe5 100644 --- a/activerecord/test/fixtures/author.rb +++ b/activerecord/test/fixtures/author.rb @@ -37,6 +37,8 @@ class Author < ActiveRecord::Base has_many :categorizations has_many :categories, :through => :categorizations + has_many :categories_like_general, :through => :categorizations, :source => :category, :class_name => 'Category', :conditions => { :name => 'General' } + has_many :categorized_posts, :through => :categorizations, :source => :post has_many :unique_categorized_posts, :through => :categorizations, :source => :post, :uniq => true -- cgit v1.2.3