codemancers / invoicing

Ruby invoicing framework gem
http://invoicing.c9s.dev/
MIT License
265 stars 40 forks source link

Fix documentation examples #42

Closed krukgit closed 9 years ago

krukgit commented 9 years ago

Examples from http://invoicing.codemancers.com/ don't work without modifications.

> invoice = InvoicingLedgerItem.new(sender: company, recipient: user)
> invoice.line_items.build(description: product.name, net_amount: product.price, tax_amount: 0)
> invoice.save
PG::NotNullViolation: ERROR:  null value in column "currency" violates not-null constraint

This works:

invoice = InvoicingLedgerItem.new(sender: company, recipient: user, currency: 'usd')
invoice.line_items.build(description: product.name, net_amount: product.price, tax_amount: 0)
invoice.save

PDF generation requires additionally gem 'prawn-table'

Could create a pull request if the docs were in github.

iffyuva commented 9 years ago

thanks for reporting. i will update docs.

iffyuva commented 9 years ago

i think you can try opening a PR against gh-pages branch. can you try that?

krukgit commented 9 years ago

Please check #43 Not sure if these should be in the same pull request but I also fixed a few typos.

iffyuva commented 9 years ago

fixedx by #43 thanks to @krukgit