diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2014-10-27 15:40:46 -0600 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2014-10-27 15:40:46 -0600 |
commit | 5d6fca0c04bab69dabe881e3e6741eff30c13c31 (patch) | |
tree | c00d6fcbef69b904fe8753039108e1904694df94 /activerecord/lib/active_record | |
parent | d616fec8117ac25753ee23e15ac14261d298ee51 (diff) | |
parent | 68bad9960a07508e24726d598d86fc26a2931264 (diff) | |
download | rails-5d6fca0c04bab69dabe881e3e6741eff30c13c31.tar.gz rails-5d6fca0c04bab69dabe881e3e6741eff30c13c31.tar.bz2 rails-5d6fca0c04bab69dabe881e3e6741eff30c13c31.zip |
Merge pull request #17405 from DanOlson/rewhere
Allow Relation#rewhere to work with infinite range values
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
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 a53e8c9d0a..e4bebf78e8 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -913,7 +913,7 @@ module ActiveRecord where_values.reject! do |rel| case rel - when Arel::Nodes::Between, Arel::Nodes::In, Arel::Nodes::NotIn, Arel::Nodes::Equality, Arel::Nodes::NotEqual + when Arel::Nodes::Between, Arel::Nodes::In, Arel::Nodes::NotIn, Arel::Nodes::Equality, Arel::Nodes::NotEqual, Arel::Nodes::LessThanOrEqual, Arel::Nodes::GreaterThanOrEqual subrelation = (rel.left.kind_of?(Arel::Attributes::Attribute) ? rel.left : rel.right) subrelation.name == target_value end |