From a3502c419e621c6abac2a9e047e42a582fd80769 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Thu, 16 Mar 2006 06:17:54 +0000 Subject: Use association's :conditions when eager loading. [jeremyevans0@gmail.com] closes #4144 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/author.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/test/fixtures/author.rb') diff --git a/activerecord/test/fixtures/author.rb b/activerecord/test/fixtures/author.rb index 3138dfca57..8c6cee51e4 100644 --- a/activerecord/test/fixtures/author.rb +++ b/activerecord/test/fixtures/author.rb @@ -4,6 +4,9 @@ class Author < ActiveRecord::Base has_many :posts_with_categories, :include => :categories, :class_name => "Post" has_many :posts_with_comments_and_categories, :include => [ :comments, :categories ], :order => "posts.id", :class_name => "Post" + has_many :special_posts, :class_name => "Post" + has_many :hello_posts, :class_name => "Post", :conditions=>"\#{aliased_table_name}.body = 'hello'" + has_many :nonexistent_posts, :class_name => "Post", :conditions=>"\#{aliased_table_name}.body = 'nonexistent'" has_many :posts_with_callbacks, :class_name => "Post", :before_add => :log_before_adding, :after_add => :log_after_adding, :before_remove => :log_before_removing, :after_remove => :log_after_removing -- cgit v1.2.3