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

Error while trying to make this gem work with nested forms #53

Open
mayordwells opened this issue Nov 6, 2019 · 1 comment
Open

Error while trying to make this gem work with nested forms #53

mayordwells opened this issue Nov 6, 2019 · 1 comment

Comments

@mayordwells
Copy link
Contributor

Hi @carlosantoniodasilva,
Trying to make this gem work with nested forms and nested attributes in my project, but for some reason, I'm getting the following error.

Screenshot from 2019-11-06 13-12-36

Checked the association_parser file and will like to extend it if possible, but I could use some help. Any suggestions on the possible fixes for this?

Thanks.

@carlosantoniodasilva
Copy link
Owner

@mayordwells I think it has to do with the fact it's dealing with an ActionController::Parameters instance and recent changes around its behavior vs a normal "Hash":

attributes = attributes.is_a?(Hash) ? attributes.values : attributes
attributes.map { |value_attributes| proxy.send(:parse_attributes, value_attributes) }

Just for the sake of trying to get it working, can you try passing in welder_certificate_params.to_h when assigning that to the localised attributes? And which version of Rails are you running with? We might need to see how we can make that more friendly with those recent Rails versions. Thanks!

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

2 participants