Module: Polaris::OptionHelper

Included in:
Component
Defined in:
app/helpers/polaris/option_helper.rb

Instance Method Summary collapse

Instance Method Details

#append_option(options, key, value) ⇒ Object



9
10
11
# File 'app/helpers/polaris/option_helper.rb', line 9

def append_option(options, key, value)
  options[key] = [options[key], value].compact.join(" ")
end

#prepend_option(options, key, value) ⇒ Object



5
6
7
# File 'app/helpers/polaris/option_helper.rb', line 5

def prepend_option(options, key, value)
  options[key] = [value, options[key]].compact.join(" ")
end