views:

17

answers:

1

I have been struggling to get a simple autocomplete working with my Rails app using the jQuery UI 'autocomplete' I'm already using jRails, so I tried using the jrails_auto_complete

I set it up like it says in the README, but I get the following javascript error when I start typing in the box:

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

URL: /users/auto_complete_for_user_name?term=a

And when I debug it it says:

Couldn't find User with ID=auto_complete_for_user_name

Any ideas? I would think it would take more than the two steps listed but I'm pretty sure I setup those two correctly...

A: 

Figured out that you need to add the following to your routes.rb file:

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