title: Rails Nested Singular Resource Routing Appending .ID
body: <p>I have the following nested singular route:</p>
  
  <pre><code>resources :listings do
    resource :logo, only: [ :edit, :update ]
  end
  </code></pre>
  
  <p>It generates 2 correct routes as expected:</p>
  
  <pre><code>edit_listing_logo GET /listings/:listing_id/logo/edit(.:format) logos#edit
  listing_logo PUT /listings/:listing_id/logo(.:format) logos#update
  </code></pre>
  
  <p>Now when I redirect to edit_listing_logo_path</p>
  
  <pre><code>redirect_to edit_listing_logo_path( @listing, @logo )
  </code></pre>
  
  <p>or when I create an update form</p>
  
  <pre><code>&lt;%= form_for [ @listing, @logo ] do |f| %&gt;
  </code></pre>
  
  <p>the resulting link has always singular resource ID attached at the end like this</p>
  
  <pre><code>/listings/2/logo.1
  </code></pre>
  
  <p>I'm not using respond formats in this app yet so it's working fine. But this link generation seems strange and I expect it to cause problems if used with various respond formats.</p>
  
  <p>Note, that this was also discussed here <a href="https://stackoverflow.com/questions/4765266/rails-nested-singular-resource-routing">Rails Nested Singular Resource Routing</a> but I'm not using 'show' path at all.</p>
  
  <p>Thanks for any inputs.                </p>