Skip to content

Instantly share code, notes, and snippets.

@levity
Created December 7, 2010 01:22
Show Gist options
  • Select an option

  • Save levity/731317 to your computer and use it in GitHub Desktop.

Select an option

Save levity/731317 to your computer and use it in GitHub Desktop.
DataMapper Identity Map on Rack
## somewhere
module Persistence
class IdentityMap
def initialize(app)
@app = app
end
def call(env)
DataMapper.repository { @app.call(env) }
end
end
end
## config.ru
use Persistence::IdentityMap
@levity

levity commented Dec 7, 2010

Copy link
Copy Markdown
Author

thx #datamapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment