title: Rails: passing arguments through controller methods
body: <p>Say I've got a standard <code>new</code> method in a controller:</p>
  
  <pre><code>def new
    @doc = Doc.new
    respond_to do |format|
      format.html
      format.json { render json: @doc }
    end
  end
  </code></pre>
  
  <p>How would I facilitate passing an argument through it, i.e.:</p>
  
  <pre><code>def new(i)
    ...
  end
  </code></pre>
  
  <p>To permit me to write something like this in the view:</p>
  
  <pre><code>&lt;%= link_to(e.name, new_doc_path(e.id)) %&gt;
  </code></pre>
  
  <p>Cheers!</p>