I’m new to Ruby, Rails and Ajax and I’m trying to do something
seemingly simple. I am trying to use a value someone supplies in a
form in another form that is dynamically generated using Ajax.
I have the following code:
<%= form_remote_tag(:update => “race_table”, :url => { :action =>
“update_races” }) %>
Ruleset: | <%= select(:post, :ruleset, @rulesets) %> |
<%= submit_tag "Find Races" %> |
Which has been changed umpteen times, but this is how it stands now
and I’m thinking it should be accurate. @rulesets contains an array
of arrays such that it prints something like Ruleset
#1
Then I have the update_races action of the same module. It does
several things but most notably (and stripped down at the moment it
does)
@ruleset = params[:ruleset] || 11
render :layout => false
Then I have the update_races.rhtml file which does lots of things but
ultimately does:
<%= @ruleset %>
And ruleset is ALWAYS 11. For some reason params[:ruleset] is always
nil. My browser is Firefox 2.0.0.6
Please help