Rails newbie question

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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs