Using collection_select for a dropdown list navigation?

I’m trying to figure out the best way to do this:
I have an Artist model
I want to create a dropdown list of all the artists in the database.
When you select one of them form the list, you get redirected to their
respective “show” action.

In my routes.rb (using REST)
map.resources :artists

In my controller:
@artists = Artist.find(:all, :order => “name”)

In my view:
<% form_for(:artist, :url => artist_path(@artist), :html => {:method
=> :get}) do |f| %>
<%= f.collection_select(‘id’, @artists, ‘id’, ‘name’) %>
<%= submit_tag “go!” %>
<% end %>

now, of course, this doesn’t work. When submitted, you just get sent
to the first “show” action. I’ve been racking my brain
trying to figure out how to do this in Rails.

Any help? Thanks much!


Basically what I’m trying to do is the Ruby/Rails equivalent of this:

Choose a destination... Artist 1 Artist 2 Artist 3 Artist 4 Artist 5 Artist 6 Artist 7 Artist 8

Here’s what I’ve come up with:
<% form_tag( “…/”) do %>
<%= collection_select(:artists, ‘id’, @artists, ‘id’, ‘name’, {},
{:onchange => “‘’ +
this.options[this.selectedIndex].value,‘_top’)”}) %>
<% end %>

This works, I’m just not sure if it’s the best way. Anyone have any