I’m still very new to rails, so tell me if I’m approaching this
stupidly.
I have a box that I want to filter some search results. I
already made it so when they change the value, it goes to the url: /
game/list/?players=3
Now, I can update the search easily enough, but how can I show the
correct value in the select box? It always goes back to the top (my
prompt value)
Here’s what I have
<%= select(:get, :players, Player.find(:all).collect {|
p| [ p.name, p.id] }, {:prompt => ‘Any # of Players’ }) %>
I am changing the url with javascript elsewhere. This, however, never
picks up the players from the url.
How can I do this?
Thanks
~sean