I''m still very new to rails, so tell me if I''m approaching
this
stupidly.
I have a <select> 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
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---