module CmAdmin::ViewHelpers::FormFieldHelper

Public Instance Methods

input_field_for_column(f, field) click to toggle source
# File lib/cm_admin/view_helpers/form_field_helper.rb, line 4
def input_field_for_column(f, field)
  case field.type
  when :integer
    return f.number_field field.name, class: 'normal-input'
  when :string
    return f.text_field field.name, class: 'normal-input'
  when :text
    return f.text_area field.name, class: 'normal-input'
  end
end