title: Undefined method 'status' for nil:nilclass
body: <p>Ok weird error. Everything was working fine.. and now its not.</p>
  
  <p>Currently I have a simple many to one association.</p>
  
  <p>Route is set up like this:</p>
  
  <pre><code>resources :apps do
    resources :forms
  end
  </code></pre>
  
  <p>App:</p>
  
  <pre><code>has_many :forms
  </code></pre>
  
  <p>Form:</p>
  
  <pre><code>belongs_to :app
  </code></pre>
  
  <p>Forms_controller index action:</p>
  
  <pre><code>def index
    @app = App.find(params[:app_id])
    @forms = @app.forms
    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @forms }
    end
  end
  </code></pre>
  
  <p>I've taken every bit of code/html out of the forms.html.erb layout file so it should be rendering a blank page.</p>
  
  <p>Instead I'm getting this error:</p>
  
  <p>undefined method `status' for nil:NilClass</p>
  
  <p>status isn't even defined anywhere in my app</p>
  
  <p>help would be greatly appreciated.</p>
  
  <p>EDIT:</p>
  
  <p>Here is what is displayed in my development.log file</p>
  
  <pre><code>Started GET "/apps/4/forms" for 127.0.0.1 at 2011-09-05 23:14:16 -0700
    Processing by FormsController#index as HTML
    Parameters: {"app_id"=&gt;"4"}
    [1m[36mApp Load (0.1ms)[0m  [1mSELECT "apps".* FROM "apps" WHERE "apps"."id" = ? LIMIT 1[0m  [["id", "4"]]
    [1m[35m (0.1ms)[0m  SELECT COUNT(*) FROM "forms" WHERE "forms"."app_id" = 4
  0
    [1m[36mForm Load (0.1ms)[0m  [1mSELECT "forms".* FROM "forms" WHERE "forms"."app_id" = 4[0m
  Rendered forms/index.html.erb within layouts/forms (1.2ms)
  Completed 500 Internal Server Error in 37ms
  
  NoMethodError (undefined method `status' for nil:NilClass):
  </code></pre>