Hello everyone.

I have a form in my ruby 1.9.2 rails 3.0.9 app, and one of the fields
is a "collection select" like this

<div class="field">
<%= f.label :provider_id, "Provider" %>
<%= collection_select( :purchase_document, :provider_id,
Provider.all, :id, :name) %>
</div>

The idea, is to be able to add a "link_to" using the selected value
from the "collection select" i.e.:

<div class="field">
    <%= f.label :provider_id, "Provider" %>
    <%= collection_select( :purchase_document, :provider_id,
Provider.all, :id, :name) %> <%= link_to "Show",
provider_path(***selected option from collection select***)%>

But, I don't know how to get the selected value. Is there a rails way
to do that?

Hope you can help me, thanks

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to