Bond
Bond is a Railtie that conveniently wires up
Rack::Transaction. It will handle
configuring Rack::Transaction
to work with ActiveRecord
if available.
Installation
Add this line to your Gemfile:
gem 'bond-railtie'
and bundle up.
Usage
Bond should just work as soon as you install it using the defaults provided
by Rack::Transaction
. If you need to do additional configuration, you can add
a Rails initializer and call Bond.setup
. The method takes in a block and
provides a Rack::Transaction::Configuration
. For example:
Bond.setup do |config|
config.exclude { |request| request.path =~ %r{/search}i }
end
Please refer to Rack::Transaction
documentation to see additional
configuration options.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request