input type number only 1 decimal code example
Example 1: input type that allows float number
<input type="number" step="0.01">
Example 2: number field for float or integer form_with
f.number_field :amount, value: number_to_currency(f.object.amount.to_f, delimiter: '', unit: ''), step: :any