mongomodel
mongomodel copied to clipboard
How to use 'OR' within a scope
How would I go about using mongo's $or functionality within mongomodel? I have two scopes that I need to merge as an OR.
scope :expires_in_future, -> { where({:expires_at.gte => Time.now}) } scope :expires_null, -> { where({:expires_at => :nil }) }
thanks