title: How to pass id to new user path?
body: <p>When on the show view of an organization, I can click on an image to go to a new view to create a new member for that organization (association 1:many for organization:members). When clicking the image, I would like to pass the organization_id to the controller so that it is automatically <em>that</em> organization for which the new member is created. How to do this?</p>
  
  <p>Included in the members controller:</p>
  
  <pre><code>def new
    @organization = Organization.find(params[:id])
    @member = @organization.members.build
  def end
  </code></pre>
  
  <p>The link in the organization show view:</p>
  
  <pre><code>&lt;%= link_to image_tag("add.png", title: "add"), new_member_path(@organization) %&gt;
  </code></pre>
  
  <p>Now clicking on the link produces the error:</p>
  
  <pre><code>Couldn't find Organization with 'id'=
  </code></pre>
  
  <p>So it doesn't seem to pass on the id to the controller. What am I doing wrong?</p>