title: Confused about how my routes are interacting with each other
body: <p>Ok, I'm gonna try to get as specific as I can.  Here's my code:</p>
  
  <p><strong>routes.rb</strong></p>
  
  <pre><code>root to: "users#index"
  match "/users/:id/about", to: "users#about", as: :about
  match "/users/:id/blog", to: "users#blog", as: :blog
  match "users/:id/contact", to: "users#contact", as: :user_contact
  match "/contact", to: "static_pages#contact", as: :static_contact
  
  resources :sessions, only: [:new, :create, :destroy]
  resources :users do
    resources :portfolios do
      resources :pictures
    end
  end
  </code></pre>
  
  <p>Here's my navigation bar with all the links on my main page:</p>
  
  <pre><code> &lt;nav&gt;
      &lt;ul class="sf-menu" id="nav"&gt;
        &lt;li class="&lt;%= "selected" if current_page?(root_path) %&gt;"&gt;&lt;%= link_to "home", root_path %&gt;&lt;/li&gt;
        &lt;li class="&lt;%= "selected" if current_page?(about_path) %&gt;"&gt;&lt;%= link_to "about me", about_path %&gt;&lt;/li&gt;
        &lt;li&gt;&lt;%= link_to "my portfolio" %&gt;
          &lt;ul&gt;
            &lt;% @user.portfolios.each do |portfolio| %&gt;
              &lt;li&gt;&lt;%= link_to portfolio.name, user_portfolio_path(@user, portfolio) %&gt;&lt;/li&gt;
            &lt;% end %&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li class="&lt;%= "selected" if current_page?(blog_path) %&gt;"&gt;&lt;%= link_to "blog", blog_path %&gt;&lt;/li&gt;
        &lt;li class="&lt;%= "selected" if current_page?(user_contact_path) %&gt;"&gt;&lt;%= link_to "contact", user_contact_path %&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  </code></pre>
  
  <p>When I link from any link (home, about me, blog, contact) to any other link everything works fine.  For example when I'm on the about me page (/users/8/about) I can link to the contact page(users/8/contact).  The problem is when I land on the portfolio page (/users/8/portfolios/31) and try to link to the about me page, for example, the url becomes this: /users/31/about instead of back to /users/8/about.  User 31 doesn't exist but portfolio 31 exists.</p>