Use #transform_keys instead of .map.to_h
This commit is contained in:
parent
7794973774
commit
0022ea71c5
1 changed files with 2 additions and 2 deletions
|
@ -10,8 +10,8 @@ class SIRETService
|
|||
exercices_array = ApiEntreprise::ExercicesAdapter.new(siret, procedure_id).to_array
|
||||
|
||||
params = etablissement_params
|
||||
.merge(entreprise_params.map { |k, v| ["entreprise_#{k}", v] }.to_h)
|
||||
.merge(association_params&.map { |k, v| ["association_#{k}", v] }.to_h)
|
||||
.merge(entreprise_params.transform_keys { |k| "entreprise_#{k}" })
|
||||
.merge((association_params || {}).transform_keys { |k| "association_#{k}" })
|
||||
.merge(exercices_attributes: exercices_array)
|
||||
|
||||
# This is to fill legacy models and relationships
|
||||
|
|
Loading…
Add table
Reference in a new issue