Forum: Ruby on Rails Rails newbie question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Dave (Guest)
on 2006-01-06 22:50
Ok, I've got an autocomplete dropdown, and what I want to do is get the
value selected from the dropdown, and then render a link_to that will
pass that value (:id => ???) to a controller method. Can I do this all
in the partial (like I'm attempting below), or do I have to go from
text_field_with_auto_complete back to the controller, then render the
link_to in another partial?

The dropdown part works fine, btw. I'm just having trouble accessing
it's value.

<%= text_field_with_auto_complete :patient, :name,
        {}, :skip_style => true,
        	:url => {:action => "auto_complete_for_patient_name",
        		      :cohort_id	=> @cohort_id

<%= link_to "add", { :controller => "foobar",
                     :action => "get_patient_info",
                     :id => ??? },
                     :class => "nav"


thanks in advance,
This topic is locked and can not be replied to.