Low commit activity in last 3 years
A long-lived project that still receives updates
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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

Runtime

>= 4.1, < 8
>= 5.1, < 8
 Project Readme

acts_as_account

Build Status

Theory

ActsAsAccount implements a "Double Entry Accounting" system for your Rails-models.

It hooks into ActiveRecord and allows to add accounts to any model by simply means of adding has_account to your model. Because the accounts are connected via a has_many relation no migration to the account-holder tables is needed.

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

How to test

Run the cucumber features from the acs_as_account gem, just execute

  • rake features:create_database
  • cucumber

How to release

You need to update the data in VERSION and Rakefile and run rake (because it uses Gemhadar). rake gem:push will push the version to rubygems.

Links

Compatibility

Rails 4 is supported since version 3.1.0, Rails 7 since 3.2.2 .

Credits

This gem was written for the payment backend of betterplace.org by Thies C. Arntzen, "thieso2", Norman Timmler, "unnu" and others.

Copyright

Copyright (c) 2010, 2022 gut.org gAG, released under the Apache License v2.0.