HI ,
I am using Auto complete in rails .
My auto complete looks like
<%= text_field_with_auto_complete User.name, :login, { :size => 15 }, { :url => {:controller => 'users', :action => 'autocomplete_for_supervisors'}, :method => :get, :param_name => 'term'} %>
This generates the fields where
<input type="text" 开发者_开发问答 size="15" name="Franklin Roosevl[login]" id="Franklin_Roosevl_login">
<div id="Franklin Roosevl_login_auto_complete" class="auto_complete"></div>
This doesnt allows me to do auto complete . But if my Username is a single name its working perfectly How to solve this issue.
Why are you naming your text field with User.name??
Maybe you should try this:
<%= text_field_with_auto_complete :user, :login, { :size => 15 }, { :url => {:controller => 'users', :action => 'autocomplete_for_supervisors'}, :method => :get, :param_name => 'term'} %>
精彩评论