Open
Description
So I am trying to implement multiple autocomplete and simple_form and am getting an error.
I tried this:
<%= f.input_field :neighborhood_id, collection: Neighborhood.order(:name), :url => autocomplete_neighborhood_name_searches_path, :as => :autocomplete, 'data-delimiter' => ',', :multiple => true, :class => "span8" %>
This is the error I get:
undefined method `to_i' for ["Alley Park, Madison"]:Array
In my params, it is sending this in neighborhood_id
:
"search"=>{"neighborhood_id"=>["Alley Park, Madison"],
So it isn't even using the IDs for those values.
Ideas?
Metadata
Metadata
Assignees
Labels
No labels
Activity
marcamillion commentedon Feb 19, 2013
bump Any takers?
manusajith commentedon Nov 22, 2013
@marcamillion if you need the object_id you should use the id_element. Details here