carlosantoniodasilva/i18n_alchemy

Error while trying to make this gem work with nested forms

Opened this issue · 1 comments

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.

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