title: redirect to index rather than show after save
body: <p>I want to redirect to the a models index view after saving my model. </p>
  
  <pre><code>def create
    @test = Test.new(params[:test])
  
    respond_to do |format|
      if @test.save
        format.html { redirect_to @test, notice: 'test was successfully created.' }
      else
        format.html { render action: "new" }
      end
    end
  end
  </code></pre>
  
  <p>I've tried</p>
  
  <pre><code>    format.html { render action: "index", notice: 'Test was successfully created.' }
  </code></pre>
  
  <p>but I get the following error in /app/views/tests/index.html.erb - </p>
  
  <pre><code>   undefined method `each' for nil:NilClass
  </code></pre>
  
  <p>Any idea what's going wrong?</p>