Flexible double-entry accounting engine for Rails apps