Class: ColorpickerInput
- Inherits:
-
SimpleForm::Inputs::StringInput
- Object
- SimpleForm::Inputs::StringInput
- ColorpickerInput
- Defined in:
- lib/bootstrap_colorpicker_rails/simple_form/colorpicker_input.rb
Instance Method Summary collapse
Instance Method Details
#input(wrapper_options) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/bootstrap_colorpicker_rails/simple_form/colorpicker_input.rb', line 2 def input() idf = "#{lookup_model_names.join("_")}_#{reflection_or_attribute_name}" script = template.content_tag(:script, type: 'text/javascript') do "$('input[id=#{idf}]').colorpicker();".html_safe end super + script end |
#input_type ⇒ Object
11 12 13 |
# File 'lib/bootstrap_colorpicker_rails/simple_form/colorpicker_input.rb', line 11 def input_type :string end |