Permalink
Browse files

Add a note about identity map usage.

  • Loading branch information...
1 parent 3723150 commit 8cf29ce310eafaa6652bec671dc1139b58f4a269 @jnunemaker jnunemaker committed Sep 12, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/mongo_mapper/middleware/identity_map.rb
View
7 lib/mongo_mapper/middleware/identity_map.rb
@@ -1,5 +1,12 @@
module MongoMapper
module Middleware
+ # Usage:
+ #
+ # config.middleware.insert_after \
+ # ActionDispatch::Callbacks,
+ # MongoMapper::Middleware::IdentityMap
+ #
+ # You have to insert after callbacks so the entire request is wrapped.
class IdentityMap
class Body
def initialize(target, original)

0 comments on commit 8cf29ce

Please sign in to comment.