POST working with prefill query example for repeating fields
This commit is contained in:
parent
81df033282
commit
20ba96ba3c
10 changed files with 76 additions and 10 deletions
|
@ -7,7 +7,7 @@ module DossierPrefillableConcern
|
|||
return unless champs_public_attributes.any?
|
||||
|
||||
attr = { prefilled: true }
|
||||
attr[:champs_public_all_attributes] = champs_public_attributes.map { |h| h.merge(prefilled: true) }
|
||||
attr[:champs_public_all_attributes] = champs_public_attributes.compact.map { |h| h.merge(prefilled: true) }
|
||||
|
||||
assign_attributes(attr)
|
||||
save(validate: false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue