title: Redirect parameterized URL
body: <p>I have the record's ID and name in the URL.</p>
  
  <pre><code>def to_param
      "#{id} #{name}".parameterize
  end
  </code></pre>
  
  <p>But any name works in the URL. I can do the following and it works</p>
  
  <pre><code>www.site.com/records/ID-anything-here-works
  </code></pre>
  
  <p>How can I redirect <code>ID-anything</code> to <code>ID-name</code>?</p>
  
  <p>Here is an example.</p>
  
  <p>Let's say I have a "product" model and a record with the name "shoe" and an id "6".</p>
  
  <p>The url looks like this</p>
  
  <pre><code>products/6-shoe
  </code></pre>
  
  <p>But this URL also works</p>
  
  <pre><code>products/6-eiufwojfeowjfowef
  </code></pre>
  
  <p>How can I make it so the second URL redirects to the first?</p>
  
  <p>I'm working with the show action:</p>
  
  <pre><code>def show
      @website = Website.find(params[:id])
  end
  </code></pre>