Formalism Sequel Transactions
Sequel transaction inside Formalism forms.
Installation
Add this line to your application's Gemfile:
gem 'formalism-sequel_transactions'
And then execute:
bundle install
Or install it yourself as:
gem install formalism-sequel_transactions
Usage
require 'formalism/sequel_transactions'
module MyProject
module Forms
class Base < Formalism::Form
include Formalism::SequelTransactions
private
## This is an example, but definition of this method is required
def db_connection
MyProject::Application.db_connection
end
## This is an example and not required
def after_db_transaction_commit
send_mails!
end
end
end
end
Development
After checking out the repo, run bundle install
to install dependencies.
Then, run toys rspec
to run the tests.
To install this gem onto your local machine, run toys gem install
.
To release a new version, run toys gem release %version%
.
See how it works here.
Contributing
Bug reports and pull requests are welcome on GitHub.
License
The gem is available as open source under the terms of the MIT License.