Class: MoneyInput

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

Overview

SimpleForm input wrapper: money.

Instance Method Summary collapse

Methods inherited from SymbolizedInput

#input, #input_html_classes, #render_field

Instance Method Details

#input_html_optionsObject



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

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

#span_symbolObject



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

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