From 71312443133c6bbcc518d594789f19a213369f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 21 Jul 2010 15:06:23 +0200 Subject: Ensure default_scope can be overwriten by association conditions. --- activerecord/test/models/person.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test/models/person.rb') diff --git a/activerecord/test/models/person.rb b/activerecord/test/models/person.rb index be7463f7c8..951ec93c53 100644 --- a/activerecord/test/models/person.rb +++ b/activerecord/test/models/person.rb @@ -5,6 +5,7 @@ class Person < ActiveRecord::Base has_many :references has_many :bad_references + has_many :fixed_bad_references, :conditions => { :favourite => true }, :class_name => 'BadReference' has_many :jobs, :through => :references has_one :favourite_reference, :class_name => 'Reference', :conditions => ['favourite=?', true] has_many :posts_with_comments_sorted_by_comment_id, :through => :readers, :source => :post, :include => :comments, :order => 'comments.id' -- cgit v1.2.3