Skip to content

Adding Two or more fields to Autocomplete #246

@vardhan-nyros

Description

@vardhan-nyros

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions