module AutoCompleteHelper

Call our custom autocomplete partial

Public Instance Methods

auto_complete(form_builder, model, attribute, path, label_text = nil) click to toggle source
# File app/helpers/auto_complete_helper.rb, line 3
def auto_complete(form_builder, model, attribute, path, label_text = nil)
  value = self.instance_variable_get("@#{model}").send("#{attribute}_name")
  render :partial => "auto_complete/base", 
         :locals => { 
           :f => form_builder, :model => model, :attribute => attribute, :path => path, :value => value, :label_text => label_text
         }
end