title: Rails form No Method Error
body: <p>I'm trying to put a simple form together, but I keep getting a no method error whenever I insert a form field into the html.</p>
  
  <p>What's wrong here?</p>
  
  <p><strong>The Error:</strong></p>
  
  <pre><code>undefined method `name' for #&lt;Upload id: nil, created_at: nil, updated_at: nil&gt;
  </code></pre>
  
  <p><strong>new.html.erb</strong></p>
  
  <pre><code>&lt;h1&gt;Uploads#new&lt;/h1&gt;
  &lt;p&gt;Find me in app/views/uploads/new.html.erb&lt;/p&gt;
  
  &lt;% form_for :upload, :url =&gt; uploads_path do |f| %&gt;
  &lt;p&gt;
      Name: &lt;%= f.text_field :name %&gt;
  &lt;/p&gt;
  &lt;p&gt;&lt;%= submit_tag "Create Upload" %&gt;&lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>upload.rb</strong></p>
  
  <pre><code>class Upload &lt; ActiveRecord::Base
  has_many :tasks
  
  
  end
  </code></pre>
  
  <p><strong>uploads_controller.rb</strong></p>
  
  <pre><code>class UploadsController &lt; ApplicationController
  def index
  @uploads = Upload.find(:all)
  end
  
  def new
  @upload = Upload.new
  end
  
  def create
  @upload = Upload.new(params[:project])
  if @upload.save
      flash[:notice] = "Film successfully uploaded"
      redirect_to uploads_path
  else
      render :action =&gt; 'new'
  end
  end
  end
  </code></pre>