views:

39

answers:

2

Hi, i am using the rails plugin auto_complete http://github.com/rails/auto_complete. I have followed the examples, and its all working well, but with one small problem.

After submitting an auto completed text field, and then hitting the back button, the text field does not retain the previously selected value.

Does anyone have a solution please?

thanks

+1  A: 

perhaps it is a problem with request forgery, checkout your logs. if it is the case, you can create a exception to avoid checking request forgery in your auto complete method

to do this, you should add this to your controller:

*protect_from_forgery :except => :your_auto_complete_method_name*

vrsmn
+1  A: 

I recently migrated from this plugin to jQueryUI's autocomplete widget. I find it to be much cleaner. http://jqueryui.com/demos/autocomplete/