Class: MoneyInput

Inherits:
SymbolizedInput show all
Defined in:
app/inputs/money_input.rb

Instance Method Summary collapse

Methods inherited from SymbolizedInput

#input, #input_html_classes, #render_field

Instance Method Details

#input_html_optionsObject



8
9
10
# File 'app/inputs/money_input.rb', line 8

def input_html_options
  super.merge({ html5: true, step: "0.01" })
end

#span_symbolObject



3
4
5
6
# File 'app/inputs/money_input.rb', line 3

def span_symbol
  currency_symbol = input_html_options[:symbol] || '$'
  template.(:span, currency_symbol, class: 'input-group-text')
end