Quantcast
Channel: My Pragmatic life -- a blog by Michael Grosser » MongoDB
Viewing all articles
Browse latest Browse all 3

Adding chainable scopes and named scopes to MongoMapper

$
0
0

With Scopify chainable scopes and named scopes can be added to any model, for example MongoMapper:

MongoMapper::Document::ClassMethods.send(:include, Scopify::ClassMethods)
MongoMapper::Plugins::Associations::Proxy.send(:include, Scopify::ClassMethods)

It adds basic scoping and with some love from the Mongo community, it will soon be able to also merge multiple conditions / order`s.


Tagged: Mongo, Ruby

Viewing all articles
Browse latest Browse all 3

Trending Articles