Is this a weird bug with auto_complete?

I think I may have found a bug with the auto_complete feature in rails:

My controller has a before_filter with an except clause preventing the
filter from running on a specific action. The action renders a view with
a text_field_with_auto_complete field. Much to my suprise, the filter
appears to run when I type data into this field! The filter is part of
my security regime, so I end up with a login page rendered into the
bottom right of the browser - where the auto-complete drop down list is
normally displayed. This is in Safari. Firefox doesn’t render the login
page, but if I inspect the AJAX response using the Firebug plug-in, I
can see the login page has been returned.

Weird, huh?

Lindsay

On Wednesday, June 21, 2006, at 12:35 PM, Lindsay B. wrote:

can see the login page has been returned.
http://lists.rubyonrails.org/mailman/listinfo/rails
Not really. The autocompleter just fires off an ajax request every so
often, which must normally pass through the standard filter chains.

I think if you set your before_filter
:except=>[‘auto_complete_for_object_attribute’], this problem will go
away.

_Kevin

Lindsay B. wrote:

Ah, I think I see what is happening now!

I’ve got it Kevin… my auto complete is on a model, attribute so an
example would be :except=>[‘auto_complete_for_post_title’] to use our
Blog example.

Thanks for your help
-Lindsay

I think if you set your before_filter
:except=>[‘auto_complete_for_object_attribute’], this problem will go
away.

Ah, I think I see what is happening now! Do you mean literaly
‘auto_complete_for_object_attribute’. Or if my action is called
‘search’, would I use ‘auto_complete_for_search’? Do I also need to add
a new action called '‘auto_complete_for_search’?

thanks
Lindsay