Swags stored correctly

This commit is contained in:
nasia 2017-08-26 20:41:36 +03:00
parent 2042d0eb7a
commit 4381f687b6
7 changed files with 18 additions and 28 deletions

View file

@ -1,5 +1,5 @@
.row
.col-md-6
= f.input :type, label: 'Swag\'s type', input_html: { name: "sponsor[swag_hash][#{index}][type]"}
= f.input :type, label: 'Swag\'s type', input_html: { name: "sponsor[swags][#{index}][type]", value: v_type }
.col-md-6
= f.input :quantity, input_html: { name: "sponsor[swag_hash][#{index}][quantity]"}
= f.input :quantity, as: :number, in: 0...999, input_html: { name: "sponsor[swags][#{index}][quantity]", value: v_quantity}