[Rails] returned values and consequent usage

Craig White
Sun, 29 Jan 2006 07:40:10 -0000

I think I can have finally reduced my problem to something somebody can
help me with.

I am using auto_complete...

specifically the form command is...

<%= text_area_auto_complete_for :case_manager :name %>

I need to use the value derived here in my controller...

If I use...

cm = CaseManager.find(:first, :conditions => "name = ''Thomas E
Dewey''")

it works. I need to substitute the value derived from auto_complete
above for Thomas E Dewey...

cm = CaseManager.find(:first, :conditions => "name = name")
the lookup will always return record #1

cm = CaseManager.find(:first, :conditions => "name = :name")
cm = CaseManager.find(:first, :conditions => "name = @name")
cm = CaseManager.find(:first, :conditions => "name =
case_manager_name")
all give me errors syntax or operator or run-time errors

How do I get the value derived from auto_complete into a find command?

Craig