aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/has_many_through_association.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2010-12-12 16:35:27 +0000
committerVijay Dev <vijaydev.cse@gmail.com>2010-12-16 01:49:30 +0530
commiteba76640862d071d89c846f8624d1e651d872794 (patch)
treebe04cbd5426cb1be276b1e25335f83aa77f18762 /activerecord/lib/active_record/associations/has_many_through_association.rb
parentebc47465a5865ab91dc7d058d2d8a0cc961510d7 (diff)
downloadrails-eba76640862d071d89c846f8624d1e651d872794.tar.gz
rails-eba76640862d071d89c846f8624d1e651d872794.tar.bz2
rails-eba76640862d071d89c846f8624d1e651d872794.zip
Respect the default_scope on a join model when reading a through association
Diffstat (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb
index 6ad51e2fb4..781aa7ef62 100644
--- a/activerecord/lib/active_record/associations/has_many_through_association.rb
+++ b/activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -81,7 +81,7 @@ module ActiveRecord
def find_target
return [] unless target_reflection_has_associated_record?
- with_scope(@scope) { @reflection.klass.find(:all) }
+ scoped.all
end
def has_cached_counter?