mongoid/mongoid — Issue #1344: Chaining of Atomic Commands
Author: TylerBrock
Created: 2011-10-11 21:12:33+00:00
State: open

It would be downright sick if mongoid supported translating chained atomic commands to form a bigger atomic command.

For example:
`
@post = Post.find(params[:post_id])
@post.add_to_set(:likers, @current_user.id)
@post.inc(:likes, 1)
`

Would become:
`@post = Post.find(params[:post_id]).add_to_set(:likers, @current_user.id).inc(:likes, 1)`

It would be executed in one atomic command.