aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-06-17 09:51:32 +0930
committerGitHub <noreply@github.com>2017-06-17 09:51:32 +0930
commitc295296de3c07e48557b34062adb980ef5b1ec17 (patch)
tree7a1db59a91919cdd3d54a62f47a76d6685b1debf /activerecord/lib/active_record
parentfca22ba38d264e5d4a329c6a0b7f83a5d19bdbc2 (diff)
parent532125abb4b68fee38e642e0b1c155aabfb58f0e (diff)
downloadrails-c295296de3c07e48557b34062adb980ef5b1ec17.tar.gz
rails-c295296de3c07e48557b34062adb980ef5b1ec17.tar.bz2
rails-c295296de3c07e48557b34062adb980ef5b1ec17.zip
Merge pull request #29461 from dnl/unscope_where_or
Don't require 'unscope' to be the same on both sides of an 'or' relation
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 79e65baae5..6ccdd7adcb 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -1167,7 +1167,7 @@ module ActiveRecord
end
end
- STRUCTURAL_OR_METHODS = Relation::VALUE_METHODS - [:extending, :where, :having]
+ STRUCTURAL_OR_METHODS = Relation::VALUE_METHODS - [:extending, :where, :having, :unscope]
def structurally_incompatible_values_for_or(other)
STRUCTURAL_OR_METHODS.reject do |method|
get_value(method) == other.get_value(method)