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| %>

<%= f.text_field :rounds, :value => 5 %>

<%= submit_tag "Update" %>

<% end %>

def save_rounds
Game.find(params[:id]).rounds = params[:game][:rounds]
render :action => “new”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs