Class: ColorInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Defined in:
app/inputs/color_input.rb

Instance Method Summary collapse

Instance Method Details

#input(wrapper_options = nil) ⇒ Object


2
3
4
5
6
7
8
9
# File 'app/inputs/color_input.rb', line 2

def input(wrapper_options = nil)
  input_html_classes.unshift('color')
  input_html_options[:type] ||= 'color' if html5?

  merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)

  @builder.text_field(attribute_name, merged_input_options)
end