Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
eager loading for mongoid (DEPRECATED)
Ruby
tag: 0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.rvmrc.example
.watchr
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
mongoid-eager-loading.gemspec

README.md

mongoid-eager-loading

mongoid-eager-loading adds the eager loading feature for mongoid.

Originally it is my pull request for mongoid, but it is not accepted yet, so I created this gem to get the eager loading benefits easily for my projects.

Usage

define it in your Gemfile

gem "mongoid-eager-loading"

include the module after Mongoid::Document

class User
  include Mongoid::Document
  include Mongoid::EagerLoading
end

then you can use the eager loading like

Post.includes(:user)
Post.includes(:user, :comment)

Author

Richard Huang :: flyerhzm@gmail.com :: @flyerhzm

Copyright

Copyright (c) 2010 Richard Huang. See LICENSE for details.

Something went wrong with that request. Please try again.