I''m trying to add some Ajax functionality. I have a table with rounds.
When the user enters the page I want the first thing he does is to
enter the number of rounds into a text field. Then I want a table to
appear or "blind_down" below it. I so far have:
<% remote_form_for([:school, :team, @game], :url => { :action =>
''save_rounds'', :id => @game }, :complete =>
visual_effect(:blind_down,
''standings'')) do |f| %>
<p><label
for="rounds"><strong>Rounds</strong></label><br/>
<%= f.text_field :rounds, :value => 5 %></p>
<p> <%= submit_tag "Update" %></p>
<% end %>
def save_rounds
Game.find(params[:id]).rounds = params[:game][:rounds]
render :action => "new"
end
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---