crowdint / rails3-jquery-autocomplete

An easy and unobtrusive way to use jQuery's autocomplete with Rails 3
http://rubygems.org/gems/rails3-jquery-autocomplete
MIT License
917 stars 367 forks source link

Adding Two or more fields to Autocomplete #246

Open vardhan-nyros opened 10 years ago

vardhan-nyros commented 10 years ago

Hi,

I need to add two or fields to auto-complete field. I see many of the links says that it is under pull- request.Is that true if not can you please help me in this case.

My controller is user and User belongs to location.

In my controller I have

autocomplete :location , :name,:display_value => :funky_method

What I need is along with location name the User should be searched using postcode in location Model.

Here is my location Model

def funky_method "#{self.name.capitalize} , #{self.postcode}"

end

I use Rails3.2.13 and Mongid as my backend.

Thanks in advance

manusajith commented 10 years ago

@vardhan-nyros there are many PRs regarding this feature and we are working on it. Meanwhile you can have a look at some them here and maybe integrate it into your app till we get this merged.