Here is my games_controller:

class GamesController < ApplicationController
  def show
    @user = User.find(params[:user_id])
    @game = Game.find(params[:id])
  end

  def new
    @user = User.find(params[:user_id])
    @game = Game.new
  end

  def create
    @user = User.find(params[:user_id])
    @game = Game.new(params[:id])

    if @game.save
      redirect_to user_game_path(@user, @game)
    else
      render :action => 'new'
    end
  end

  def edit

  end

  def update

  end

  def destroy

  end
end

As you can see, I haven't even begun to fight with update or edit. 
Updates to the games table will occur later with responses from a flash 
document.

>From my dev_log.  It shows that the fields I want are getting posted. 
But Rails is not seeing them.

Processing UsersController#1 (for 127.0.0.1 at 2010-09-12 14:23:26) 
[PUT]
  Parameters: {"user"=>{"game"=>{"num_of_enemies"=>"7", 
"enemy_check_box"=>["0", "50", "0", "0", "30", "0", "0", "20", "0", "0", 
"0"], "user_id"=>"1", "user_empire"=>"30", "difficulty"=>"10", 
"selection_of_enemies"=>"2"}}, "commit"=>"Begin Game", "action"=>"1", 
"_method"=>"put", 
"authenticity_token"=>"SX7VfUzPm3SdzqFoKX4DQObQaHQLXSJudlNIfEGUt2Q=", 
"id"=>"games", "controller"=>"users"}
-- 
Posted via http://www.ruby-forum.com/.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to