Module: BootstrapFormExtensions::Helpers

Included in:
ArrayedField, DateTimePickers, Scheduler, Scheduler::Serializer, SelectOrNew
Defined in:
lib/bootstrap_form_extensions/helpers.rb

Instance Method Summary collapse

Instance Method Details

#glyphicon_tag(*icons) ⇒ Object



5
6
7
8
9
10
# File 'lib/bootstrap_form_extensions/helpers.rb', line 5

def glyphicon_tag *icons
  options = icons.extract_options!
  options[:class] = options.fetch :class, ''
  options[:class] << " glyphicon " << icons.flatten.map{ |icon| "glyphicon-#{icon}"}.join(' ')
   :i, nil, options
end

#true?(value) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/bootstrap_form_extensions/helpers.rb', line 12

def true? value
  value.to_s.match(/(true|t|yes|y|1)$/i).present?
end