-
Type: Bug
-
Resolution: Done
-
Priority: Blocker - P1
-
Affects Version/s: 6.0.1
-
Component/s: None
-
None
After bumping to latest patch, I'm getting this error from some of my tests:
Failure/Error:
Pricing::Discount
.where(:created_at.lt => 30.days.ago)
.active # scope defined as ->
.pluck(:id)
.map(&:to_s)
NoMethodError:
undefined method `|' for 2016-09-19 13:22:25 UTC:Time
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria/queryable/selector.rb:24:in `block (2 levels) in merge!'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria/queryable/selector.rb:23:in `merge'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria/queryable/selector.rb:23:in `block in merge!'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria/queryable/selector.rb:21:in `each_pair'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria/queryable/selector.rb:21:in `merge!'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria.rb:240:in `merge!'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria.rb:224:in `merge'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/scopable.rb:322:in `block (2 levels) in define_scope_method'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria.rb:500:in `block in method_missing'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/scopable.rb:230:in `with_scope'
- /Users/bcrouse/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/mongoid-6.0.1/lib/mongoid/criteria.rb:499:in `method_missing'
It looks like it was introduced with this commit: https://github.com/mongodb/mongoid/commit/7bef4aaad6a0a1cbbb21c6618707e8251be949ba which was a patch for MONGOID-4310
- is duplicated by
-
MONGOID-4359 issue with where selector
- Closed
-
MONGOID-4358 Origin 2.2.1. brought up a strange bug
- Closed