Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Double entry accounting system for Rails models. Your models get accounts and you can do consistent transactions between them.
Tag: v1.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
db
features
lib
.specification
MIT-LICENSE
README.rdoc
Rakefile
VERSION
cucumber.yml
env.sh
init.rb

README.rdoc

acts_as_account implements double entry accounting for Rails models. Your models get accounts and you can do consistent transactions between them. Since the documentation is sparse, see the transfer.feature for usage examples.

Theory

Acts as account hooks into ActiveRecord and allows to add accounts to any model by simply adding “has_account” to your model. Because the accounts are connected via a has_many relation no migration to the account-hoder tables is needed.

We also hook into the ActionController request cycle to warn the developer if a Request has left the uncommitted changes in the system.

If you would like to run the cucumber features from the acs_as_account gem, just execute

  • rake features:create_database

  • cucumber

Links

Todo

  • add transaction isolation tests

Credits

This gem was written for the payment backend of betterplace.org by Thies C. Arntzen (github.com/thieso2) and Norman Timmler (github.com/unnu).

Copyright

Copyright © 2010 gut.org gAG

Something went wrong with that request. Please try again.