title: uninitialized constant ActionView::CompiledTemplates::Category
body: <p>using this tutorial</p>
  
  <p><a href="http://railscasts.com/episodes/57-create-model-through-text-field" rel="noreferrer">http://railscasts.com/episodes/57-create-model-through-text-field</a></p>
  
  <p>need to make it work in my app, was on rails 3.0.7 and it worked fine, updated it to 3.1.3 and I got this error now</p>
  
  <pre><code>uninitialized constant ActionView::CompiledTemplates::Category
  </code></pre>
  
  <p>I would look for answers more time but now I am really short on time. I have looked into most part of google results related to this problem and no good. Need help please.</p>
  
  <p><strong>form</strong></p>
  
  <pre><code>&lt;%= f.collection_select :category_id, Category.find(:all), :id, :name, :prompt =&gt; "Select a Category" %&gt;
  or create one:
  &lt;%= f.text_field :new_category_name %&gt;
  </code></pre>
  
  <p><strong>model</strong></p>
  
  <pre><code>class Tvstation &lt; ActiveRecord::Base
    belongs_to :category
    attr_accessor :new_category_name
    before_save :create_category_from_name
  
    def create_category_from_name
      create_category(:name =&gt; new_category_name) unless new_category_name.blank?
    end
  end
  </code></pre>