Simplify default values in Voucher form

This commit is contained in:
Maikel Linke
2023-08-14 12:23:00 +10:00
parent efe2dfff8e
commit 4b0e910dff

View File

@@ -19,9 +19,9 @@
.alpha.four.columns
= f.label :type, t('.voucher_type')
.omega.eight.columns
= f.select :type, options_for_select(Voucher::TYPES.map { |type| [t(".#{type.demodulize.underscore}"), type] }, @voucher.class.to_s)
= f.select :type, options_for_select(Voucher::TYPES.map { |type| [t(".#{type.demodulize.underscore}"), type] }, @voucher.type)
.row
.alpha.four.columns
= f.label :amount, t('.voucher_amount')
.omega.eight.columns
= f.text_field :amount, value: @voucher.amount
= f.text_field :amount