aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-03-31 15:06:22 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-03-31 15:06:22 -0300
commitbaa176e3f043dbea4e64dbc25dfa1b7ee02a9831 (patch)
tree081657325d768bb3e0d14a892464f2fe52cb616f /activerecord/lib
parent7f6af33de837eeaad21f485b34ee09f682a99dbc (diff)
parent4596e16f1a55629ed2934abcd4fc386641d32c30 (diff)
downloadrails-baa176e3f043dbea4e64dbc25dfa1b7ee02a9831.tar.gz
rails-baa176e3f043dbea4e64dbc25dfa1b7ee02a9831.tar.bz2
rails-baa176e3f043dbea4e64dbc25dfa1b7ee02a9831.zip
Merge pull request #19586 from mechanicles/fix-eager-loading-for-find-methods
Fix eager loading association using default_scope for finder methods.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/scoping/default.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/scoping/default.rb b/activerecord/lib/active_record/scoping/default.rb
index 5ec2c88b47..3590b8846e 100644
--- a/activerecord/lib/active_record/scoping/default.rb
+++ b/activerecord/lib/active_record/scoping/default.rb
@@ -35,7 +35,7 @@ module ActiveRecord
# Are there attributes associated with this scope?
def scope_attributes? # :nodoc:
- super || default_scopes.any?
+ super || default_scopes.any? || respond_to?(:default_scope)
end
def before_remove_const #:nodoc: