title: undefined method `model_name', Rails
body: <p>I am trying to implement simple form in home#index page using:</p>
  
  <pre><code>&lt;%= render "forms/form"%&gt;
  </code></pre>
  
  <p>Form look like this:</p>
  
  <pre><code>&lt;%= form_for(@form) do |f| %&gt;
    &lt;% if @form.errors.any? %&gt;
      &lt;div id="error_explanation"&gt;
        &lt;h2&gt;&lt;%= pluralize(@form.errors.count, "error") %&gt; prohibited this form from being saved:&lt;/h2&gt;
  
        &lt;ul&gt;
        &lt;% @form.errors.full_messages.each do |msg| %&gt;
          &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
        &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
    &lt;div class="field"&gt;
      &lt;%= f.label :defect %&gt;&lt;br /&gt;
      &lt;%= f.text_field :defect %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :region %&gt;&lt;br /&gt;
      &lt;%= f.text_field :region %&gt;
    &lt;/div&gt;
    &lt;div class="actions"&gt;
      &lt;%= f.submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>But when I access that page, I got this error message:</p>
  
  <pre><code>undefined method `model_name' for NilClass:Class
  </code></pre>
  
  <p>First of all I though it is because my model name is also Form, but then I checked Rails 3 reserved words, but there wasn't "form" !</p>
  
  <p>Thanks in advance!</p>