Module: ActionView::Helpers

Defined in:
lib/rails/jquery/tokeninput/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#text_field(object_name, method, options = {}) ⇒ Object



3
4
5
6
7
8
# File 'lib/rails/jquery/tokeninput/form_helper.rb', line 3

def text_field(object_name, method, options = {})
  if tokeninput?(options) && need_to_pre_populate?(object_name, method, options)
    options[:data][:tokeninput][:options][:prePopulate] = items_to_prepopulation(object_name, method, options)
  end
  Tags::TextField.new(object_name, method, self, options).render
end