Sha256: bcbcc60c77729e3f33bb52718ac093c069a25504feb0ad310411be3ad60681d5
Contents?: true
Size: 875 Bytes
Versions: 16
Compression:
Stored size: 875 Bytes
Contents
# frozen_string_literal: true module Eac module CommonFormHelper class FormBuilder module CommonTextFields %w(email password text).each do |t| class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 def #{t}_field(field_name, options = {}) # def text_field(field_name, options = {}) field(field_name, options) do # field(field_name, options) do input_options = options[:input_options] || {} input_options[:class] ||= 'form-control' @form.#{t}_field(field_name, # @form.text_field(field_name, input_options) # class: 'form-control') end # end end # end RUBY_EVAL end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems