class MoneyInput
Public Instance Methods
input()
click to toggle source
# File lib/mongoid_money_field/simple_form/money_input.rb, line 4 def input add_size! input_html_classes.unshift("numeric") if html5? input_html_options[:type] ||= "number" input_html_options[:step] ||= integer? ? 1 : "any" end @builder.text_field(attribute_name, input_html_options) end
Private Instance Methods
add_size!()
click to toggle source
Rails adds the size attr by default, if the :size key does not exist.
# File lib/mongoid_money_field/simple_form/money_input.rb, line 17 def add_size! input_html_options[:size] ||= nil end