title: ruby on rails recieving error: First argument in form cannot contain nil or be empty
body: <p>We have an error in our erb files and the screen shot is here<a href="https://i.stack.imgur.com/1wKJx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1wKJx.png" alt="enter image description here"></a></p>
  
  <p>We have everything in games.html.erb as below</p>
  
  <pre><code>&lt;h1&gt;Games#game&lt;/h1&gt;
  &lt;%= form_for(@game) do |f| %&gt;
    &lt;div class="game-field"&gt;
    &lt;%= f.label :name %&gt;
    &lt;%= f.text_field :name %&gt;
  &lt;/div&gt;
   &lt;div class="actions"&gt;
    &lt;%= submit_tag "Game Created", :class=&gt; "btn" %&gt;
  &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>and here is the controller</p>
  
  <pre><code>class GamesController &lt; ApplicationController
  
  
  before_filter :store_location, :only =&gt; [:index, :show]
    before_filter :require_user, :only =&gt; :show
    before_filter :assign_game, :only =&gt; [:show, :destroy]
  
    def index
      @game = Game.new
    end
  
    def new
      @game = Game.new
    end
  
      @game.add_player_from_user(current_user)
      respond_to do |format|
        format.html
         format.json do render :json =&gt; {
           :shouldStartNewRound =&gt; @game.is_ready_for_new_round?,
           :shouldPassCards =&gt; @game.is_ready_to_pass?,
           :isStartingFirstRound =&gt; @game.rounds.empty?,
           :shouldReloadWaitAutoPlay =&gt; @game.should_reload?(current_player),
           :shouldReloadAndJustWait =&gt; @game.should_reload_and_wait?(current_player)
          }
       end
      end
    end
  
    def create
      @game = Game.new(params[:game])
      api_key = ""
      api_secret = ""
      @openTok = OpenTok::OpenTokSDK.new api_key, api_secret
      session = @openTok.create_session request.remote_addr
      @game.update_attributes(:session_id =&gt; session.session_id)
      name = game[:name] # input from html
      @game[:name] = name # setting input into db object (model)
  
      if @game.save
        redirect_to @game, alert: "game created"
      else
        render action: 'new'
      end
    end
  
    def destory
      @game.destory
      redirect_to games_url
    end
  
    def reload
      reload_partial
    end
  end
  </code></pre>
  
  <p>We are trying to create a deuces card game and we have bee stuck on that single problem. I have also looked for other similar problem that people have asked and we were not able to find the issue, it says that we have to put .new function to initialize the data. But the error is still showing up. Please help us!</p>