mongoid / origin

A Ruby DSL for building MongoDB queries
http://mongoid.org/en/origin/index.html
MIT License
62 stars 29 forks source link

Block-Based Query Syntax #34

Closed yfeldblum closed 11 years ago

yfeldblum commented 12 years ago

Feature Suggestion:

Support block-based query syntax a la Squeel.

Article.where{created_at >= 2.weeks.ago}

In addition to normal hash-based query syntax.

Article.where(:created_at.gte => 2.weeks.ago)
durran commented 11 years ago

Staying with normal syntax, since it's more familiar to AR users.