A MongoMapper plugin that allows multiple modifications to a document in a single update.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
Gemfile
Gemfile.lock
README.textile

README.textile

MongoMapper Multi-Modifiers

This is a plugin for MongoMapper that allows updates to multiple fields in a single document within a single update call.

Example


Foo.modify(:title => "My Favorite Colors") do
  push(:colors => ["red", "blue"])
  increment(:num_colors => 2)
end

TODO

  • Gem spec
  • Look at how BulkModifier evaluates its block and see if there’s a cleaner way.