The following query does not work and it keeps giving a weird error:
keys must be strings or symbols
Session.where(:created_at.gte => (Date.today - 30), :created_at.lte => (Date.today).first
Here is the content of the query when I inspect it:
:::::::::::::::::: # selector: {#=>Wed, 04 Jan 2012, #=>Thu, 05 Jan 2012},
options: {},
class: Session,
embedded: false>
:::::::::::::::::: # selector: {#=>Wed, 04 Jan 2012, #=>Thu, 05 Jan 2012},
options: {},
class: Session,
embedded: false>
:::::::::::::::::: # selector: {#=>Wed, 04 Jan 2012, #=>Thu, 05 Jan 2012},
options: {},
class: Session,
embedded: false>
Any ideas on what I might be doing wrong or does mongoid have a bug?
I spoke to the developer of the gem and he says it is supported in rails 3.1 +
Also, we made this work by using a different syntax (similar to javascript).
And it turns out this is supported in rails 3.0