module Formtastic::InputHelpers

Public Instance Methods

ci_hidden_field(name, value = nil, options = {}) click to toggle source
# File lib/formtastic/input_helpers.rb, line 13
def ci_hidden_field(name, value = nil, options = {})
  template.hidden_field_tag(name, value, options.merge(class: input_classes(options)))
end
ci_text_field(name, value = nil, options = {}) click to toggle source
# File lib/formtastic/input_helpers.rb, line 17
def ci_text_field(name, value = nil, options = {})
  template.text_field_tag(name, value, options.merge(class: input_classes(options)))
end
icon_tag(icon_name) click to toggle source
# File lib/formtastic/input_helpers.rb, line 3
def icon_tag(icon_name)
  template.content_tag(:i, '', class: "fa fa-#{icon_name}")
end
input_classes(options) click to toggle source
# File lib/formtastic/input_helpers.rb, line 7
def input_classes(options)
  classes = 'custom-inputs--input-field'
  classes += ' ' + options[:class] if options[:class]
  classes
end