Rails 3 - AutoComplete with jQuery
I'm interested in using the Rails 3 AutoComplete plugin for jQuery but the one tutorial provided doesn't match my use case. Hoping for some help...
Plug In: http://github.com/crowdint/rails3-jquery-autocomplete-app
I have a Permissions Controller where people can add team members.
On the Permissions SHOW view I want to show a autocomplete for user's....
Here's what I did: Added all the required JS in the header, loaded fine
In the permissions controller:
autocomplete :user, :name
In the config.rb:
get 'permission/autocomplete_user_name'
Then in the Permissions SHOW View
<%= form_tag do %>
<%=text_field_tag 'name', '', :autocomplete => permission_autocomplete_user_name_path %>
<% end %>
But nothing happens. No errors, and no jquery autocomplete action or activity in FireBug. Sugge开发者_运维技巧stions? Thank you
Edit the config/routes.rb file, and add:
get 'permission/autocomplete_user_name'
I think you need to make permission in the config.rb file as well as in the show view plural. Try making it permissions
精彩评论