Jquery jrails\u auto\u完整安装帮助

Jquery jrails\u auto\u完整安装帮助,jquery,ruby-on-rails,jquery-ui,jrails,jrails-auto-complete,Jquery,Ruby On Rails,Jquery Ui,Jrails,Jrails Auto Complete,我一直在努力使用jQueryUI“autocomplete”在Rails应用程序中实现简单的自动完成。我已经在使用jRails了,所以我尝试使用 我按照自述文件中的说明进行了设置,但当我开始在框中键入时,出现以下javascript错误: Failed to load resource: the server responded with a status of 404 (Not Found) URL: /users/auto_complete_for_user_name?term=a 当我

我一直在努力使用jQueryUI“autocomplete”在Rails应用程序中实现简单的自动完成。我已经在使用jRails了,所以我尝试使用

我按照自述文件中的说明进行了设置,但当我开始在框中键入时,出现以下javascript错误:

Failed to load resource: the server responded with a status of 404 (Not Found)

URL: /users/auto_complete_for_user_name?term=a
当我调试它时,它说:

找不到用户名ID为自动完成的用户


有什么想法吗?我认为这需要比列出的两个步骤更多的步骤,但我非常确定我正确地设置了这两个步骤…

发现您需要将以下内容添加到routes.rb文件中:

map.resources :users, :collection => {:auto_complete_for_user_name => :get}