Autocomplete with extra data

I have the autocompleter using the :select => ‘NAME’ option.

This is the partial:

    <% @dt.each do |user| -%>
  • <%=h user[0] %>
    <%= user[0] %>
    <%= user[1] %>
  • <% end %>

I am getting all of the data when I select the name. I have done this
before but I am not sure why it is retrieving all of the data as the
select option is supposed to only use the data in the class
specified. any ideas?

Wtf is this about?

2009/10/9, Me [email protected]:

<%= user[0] %>
select option is supposed to only use the data in the class
specified. any ideas?


Von meinen Mobilgerät aus gesendet

Ok here is the full code then.
<%= text_field_with_auto_complete :friend, :name,{:select => “NAME”},
:after_update_element => “function(element,value){” +
remote_function(:url
=> { :controller => ‘followerranking’, :action => :ajax_add_friend },
:with
=> “‘friend[name]=’ + element.value”) + “}” %>

Partial for autocomplete drop down. The SELECT above is supposed to
pick
the element with the class specified. It is selected everything not
only
just the div witht he class name.

    <% @dt.each do |user| -%>
  • <%=h user[0] %>
    <%= user[0] %>
    <%= user[1] %>
  • <% end %>

Anybody? this behaves like the select statement is not even there for
some reason.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs