title: Pass a url as a parameter in Ruby on Rails route
body: <p>I'm trying to pass an audio URL as a parameter in Ruby on Rails, and googling "how to pass a url in a url" has proved to be problematic. The problem is that I can only get the url to return minus a crucial forward slash. </p>
  
  <p>My route looks like:</p>
  
  <pre><code>get 'my_page/:title/*url', to: 'my_page', action: 'show'
  </code></pre>
  
  <p>The variable is defined in the controller like so:</p>
  
  <pre><code>@url=params[:url]
  </code></pre>
  
  <p>So the request would look like:</p>
  
  <pre><code>www.my_app.com/my_page/im_a_title/http://im_a_url.mp3
  </code></pre>
  
  <p>The url variable, however, ultimately results missing a slash after the prefix:</p>
  
  <pre><code>http:/im_a_url.mp3 &lt;--notice the missing forward slash
  </code></pre>
  
  <p>Of note, the construction of the urls varies enough that it would be cumbersome to construct them. (Some begin with http and some https, for instance.) How do I preserve the syntax of my url? Or is there a better way to pass this parameter all together? </p>