aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorDan Sherson <me@dansherson.com>2017-06-15 20:29:30 +1000
committerDan Sherson <me@dansherson.com>2017-06-15 20:36:23 +1000
commit532125abb4b68fee38e642e0b1c155aabfb58f0e (patch)
tree737ee87ad59a63e3a6f3125d78f988440844b6fe /activerecord/lib/active_record/relation
parentbbd8084ffe413e1f0848fc09432997011909f232 (diff)
downloadrails-532125abb4b68fee38e642e0b1c155aabfb58f0e.tar.gz
rails-532125abb4b68fee38e642e0b1c155aabfb58f0e.tar.bz2
rails-532125abb4b68fee38e642e0b1c155aabfb58f0e.zip
Don't require 'unscope' to be the same for both sides of a 'or' relation.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-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)