Open mariia-kulakova opened 4 years ago
@mariia-kulakova thanks for the report. Is there any code snippet which I can use to reproduce this issue?
@iffyuva Thanks for quick responding! I created mini project, which you can setup and run to see issue - https://github.com/mariia-kulakova/invoicing-nested_form_fields_app After running project please go to http://localhost:3000/invoices/new - here is issue
I will take a look and get back to you @mariia-kulakova
@iffyuva Thank you
Hi @iffyuva - we were curious when you would be able to provide an update on this. This is a blocker for us and we can try to investigate a solution if necessary.
Hi @leerodgers , I'm thinking of picking this coming weekend. I'd suggest that you also debug this issue at your end.
@iffyuva
When I replace this line: https://github.com/code-mancers/invoicing/blob/master/lib/invoicing/line_item.rb#L199 with return if ledger_item.nil?
- it works fine. Can it be as solution for this issue or it can break anything?
@iffyuva - Is the fix in that fork good? Can you merge it into the repo? Works for us 👍
After upgrading from 4.2 to rails 5.2 gem doesn't allow to use nested_form_fields any more. Error message is 'Cannot determine currency for line item without a ledger item'. nested_form_fields gem uses empty object by default (in this case ledger_item is nil)