diff options
author | Matthew Draper <matthew@trebex.net> | 2016-01-12 13:59:46 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-01-12 13:59:46 +1030 |
commit | d16645a37a954c5f342c724796c0a5efce7fac15 (patch) | |
tree | 0a8fb743ea54d6831cb848a37429a2635bf7e7fc /activerecord/lib/active_record/scoping | |
parent | 5eef308561b359c717b44e6d2f124100424a71a0 (diff) | |
parent | 5c6d3653830465176ed9d37ec210d55d6ab62852 (diff) | |
download | rails-d16645a37a954c5f342c724796c0a5efce7fac15.tar.gz rails-d16645a37a954c5f342c724796c0a5efce7fac15.tar.bz2 rails-d16645a37a954c5f342c724796c0a5efce7fac15.zip |
Merge pull request #23004 from matthewd/default-scope-sti
Make default scopes + STI happy again
Diffstat (limited to 'activerecord/lib/active_record/scoping')
-rw-r--r-- | activerecord/lib/active_record/scoping/default.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/scoping/default.rb b/activerecord/lib/active_record/scoping/default.rb index cdcb73382f..8baf3b8044 100644 --- a/activerecord/lib/active_record/scoping/default.rb +++ b/activerecord/lib/active_record/scoping/default.rb @@ -122,11 +122,11 @@ module ActiveRecord end def ignore_default_scope? # :nodoc: - ScopeRegistry.value_for(:ignore_default_scope, self) + ScopeRegistry.value_for(:ignore_default_scope, base_class) end def ignore_default_scope=(ignore) # :nodoc: - ScopeRegistry.set_value_for(:ignore_default_scope, self, ignore) + ScopeRegistry.set_value_for(:ignore_default_scope, base_class, ignore) end # The ignore_default_scope flag is used to prevent an infinite recursion |