Module: KolorPicker::Helper

Defined in:
lib/kolor-picker/helper.rb

Instance Method Summary collapse

Instance Method Details

#colorpicker_options(options, html_options) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/kolor-picker/helper.rb', line 3

def colorpicker_options(options, html_options)
  html_options.deep_merge({
    :data => {
      :"widget-kolor-picker" => options.to_json
    }
  })
end

#colorpicker_tag(name, value = nil, options = {}, html_options = {}) ⇒ Object



11
12
13
# File 'lib/kolor-picker/helper.rb', line 11

def colorpicker_tag(name, value = nil, options = {}, html_options = {})
  text_field_tag(name, value, colorpicker_options(options, html_options))
end