title: Can't display 2 partials on one page
body: <p>I’m trying to do the "simple todo list" task, but I don’t know how to display it on one page as on screenshot <a href="http://joxi.net/v29DKEVcBLB5mG" rel="nofollow noreferrer">http://joxi.net/v29DKEVcBLB5mG</a> (that is, there is a list of saved items and to the right is a form for adding a new one). If everything is separate it works for me, but when it renders 2 partial on one page - error <code>undefined method each for #&lt;Track:0x00007f8fc42c2698&gt; (NoMethodError in Tracks#new)</code>
  Here is my new.html.erb </p>
  
  <pre><code>&lt;h1&gt; Create a New Item!&lt;/h1&gt;
  &lt;%= render 'table' %&gt;
  &lt;%= render 'form' %&gt;
  </code></pre>
  
  <p>Table partial:</p>
  
  <pre><code>&lt;table border="1"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;ID&lt;/th&gt;
        &lt;th&gt;All Tracks&lt;/th&gt;
        &lt;th&gt;It's description&lt;/th&gt;
        &lt;th&gt;Priority&lt;/th&gt;
        &lt;th&gt;Date&lt;/th&gt;
        &lt;th&gt;Delete&lt;/th&gt;
        &lt;th&gt;Restore&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;% @track.each do |track| %&gt;
      &lt;tr&gt;
        &lt;td&gt; &lt;%= track.id %&gt; &lt;/td&gt;
        &lt;td&gt; &lt;%= link_to track.item, edit_track_path(track.id) %&gt; &lt;/td&gt;
        &lt;td&gt; &lt;%= track.description %&gt; &lt;/td&gt;
        &lt;td&gt; &lt;%= track.priority %&gt; &lt;/td&gt;
        &lt;td&gt; &lt;%= track.created_at.strftime('%d/%m/%Y') %&gt; &lt;/td&gt;
        &lt;td&gt;&lt;%= button_to "Delete", track_path(track.id), method: :delete %&gt;&lt;/td&gt;
        &lt;td&gt;&lt;%= button_to "Restore", track_path(track.id), method: :put %&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;% end %&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And _form partial:</p>
  
  <pre><code>  &lt;%= form_for @track do |f| %&gt;
    &lt;p&gt;
      &lt;%= f.label :item %&gt;&lt;br&gt;
      &lt;%= f.text_field :item %&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;%= f.label :description %&gt;&lt;br&gt;
      &lt;%= f.text_area :description %&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;%= f.select :priority, priorities,
          prompt: "Select priority" %&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;%= f.submit %&gt;
    &lt;/p&gt;
    &lt;% end %&gt;
      &lt;%= link_to 'Back', tracks_path %&gt;
      &lt;%= link_to 'Home', root_path %&gt;
  </code></pre>
  
  <p>And Tracks controller: </p>
  
  <pre><code>class TracksController &lt; ApplicationController
    before_action :find_track, only: [:show, :edit, :update, :destroy]
  
    def index
      @track = Track.all
    end
  
    def show
    end
  
    def new
      @track = Track.new
    end
  
    def create
      @track = Track.new(track_params)
      if @track.save
        flash[:success] = "It works!"
        redirect_to tracks_path
      else
        flash[:success] = "Its wrong!"
        render 'new'
      end
    end
  
    def update
      if @track.update(track_params)
        redirect_to @track
      else
        render 'edit'
      end
    end
  
    def edit
    end
  
    def destroy
      @track.destroy
      redirect_to tracks_path
    end
  
  private
    def track_params
      params.require(:track).permit(:item, :description, :priority)
    end
  
    def find_track
      @track = Track.find(params[:id])
    end
  end
  </code></pre>
  
  <p>Thanks in advance!</p>