Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5.2 and nested_form_fields gem #84

Open
mariia-kulakova opened this issue Oct 9, 2020 · 8 comments
Open

Rails 5.2 and nested_form_fields gem #84

mariia-kulakova opened this issue Oct 9, 2020 · 8 comments

Comments

@mariia-kulakova
Copy link

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)

@iffyuva
Copy link
Member

iffyuva commented Oct 9, 2020

@mariia-kulakova thanks for the report. Is there any code snippet which I can use to reproduce this issue?

@mariia-kulakova
Copy link
Author

@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

@iffyuva
Copy link
Member

iffyuva commented Oct 9, 2020

I will take a look and get back to you @mariia-kulakova

@mariia-kulakova
Copy link
Author

@iffyuva Thank you

@leerodgers
Copy link

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.

@iffyuva
Copy link
Member

iffyuva commented Oct 13, 2020

Hi @leerodgers , I'm thinking of picking this coming weekend. I'd suggest that you also debug this issue at your end.

@mariia-kulakova
Copy link
Author

@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?

@leerodgers
Copy link

@iffyuva - Is the fix in that fork good? Can you merge it into the repo? Works for us 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants