ruby on rails - how to properly create a between clause on mongo mapper -
i'm trying create query this
user.find_each(created_at: [1.day.ago.utc, date.now]) |user|
but didn't worked. return 0 users, have users created in 1 day timeframe. believe i'm doing query wrong, mongo mapper documentation says nothing this. ideas?
- activate profiling
db.setprofilinglevel(2)
. - rerun code.
- get query sent mongodb in
system.profile
collection. - run query in mongoshell check what's wrong.
- update code send command want.
Comments
Post a Comment