Help needed on "auto_complete_for" with conditions

Help needed on “auto_complete_for” with conditions I have the following in a controller, where the view allows the user to enter a partial customer number and have auto-complete provide the list of matches. It was working fine until I added a condition (to see if it would work). Here’s the code and the (incorrect?) SQL generated. Is this a bug or am I going at this the wrong way? It seems like the SQL is not being generated correctly, even though the controller is processing the condition.

From controller…

auto_complete_for :customer, :customernumber, :conditions => {‘deleted_at=’, 0}

From development.log…(note: my “customernumber” field is a string, not an integer)

Processing SalesdocumentsController#auto_complete_for_customer_customernumber (for 127.0.0.1 at 2006-08-30 12:40:56) [POST]

Session ID: d140dfc13f62b939f26e39068c91c677

Parameters: {“action”=>“auto_complete_for_customer_customernumber”, “controller”=>“salesdocuments”, “customer”=>{“customernumber”=>“john”}}

[4;35;1mCustomer Load (0.000000)[0m [0mSELECT * FROM customers WHERE (deleted_at=0) ORDER BY customernumber ASC LIMIT 10[0m

Completed in 0.00010 (10000 reqs/sec) | Rendering: 0.00000 (0%) | DB: 0.00000 (0%) | 200 OK [http://localhost/salesdocuments/auto_complete_for_customer_customernumber]

Any help would be appreciated.

Thanks,

Nathan