Module: DataMapper
- Defined in:
- lib/data_mapper/master_slave_adapter/middleware/write_unbinding.rb,
lib/data_mapper/adapters/reader_pool_adapter.rb,
lib/data_mapper/master_slave_adapter/version.rb,
lib/data_mapper/adapters/master_slave_adapter.rb
Overview
Use this Rack middleware after your DataMapper repositories have been set up.
It will ensure the binding to master is reset at the end of every request.
use DataMapper::MasterSlaveAdapter::Middleware::WriteUnbinding, :your_repository
If you are using Rails, it is possible to do this from inside of your ApplicationController.
Defined Under Namespace
Modules: Adapters, MasterSlaveAdapter