diff options
author | Subba Rao Pasupuleti <subbarao.pasupuleti@gmail.com> | 2010-07-19 21:26:57 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-21 15:01:40 +0200 |
commit | d77c3b669ce052234868b3d8e4f066e1baf9dbd5 (patch) | |
tree | 36d1b68df14a71860ed6133c12792f65c053f784 /activerecord/lib/active_record | |
parent | 992711a86bc4ddd4460f9067e49eea36b37ca94f (diff) | |
download | rails-d77c3b669ce052234868b3d8e4f066e1baf9dbd5.tar.gz rails-d77c3b669ce052234868b3d8e4f066e1baf9dbd5.tar.bz2 rails-d77c3b669ce052234868b3d8e4f066e1baf9dbd5.zip |
eagerly loaded association records should respect default_scope [#2931 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/association_preload.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb index 9172ab2a20..08601f8ef9 100644 --- a/activerecord/lib/active_record/association_preload.rb +++ b/activerecord/lib/active_record/association_preload.rb @@ -378,7 +378,7 @@ module ActiveRecord :order => preload_options[:order] || options[:order] } - reflection.klass.unscoped.apply_finder_options(find_options).to_a + reflection.klass.scoped.apply_finder_options(find_options).to_a end |