title: Routing with space replacement in URL
body: <p>I want to link to <code>/member/:name</code>. I'm using this line in <code>routes.rb</code>:</p>
  
  <pre><code>match 'member/:id', :to =&gt; "members#show", :as =&gt; :show_member, :via =&gt; :get
  </code></pre>
  
  <p>and this in the model:</p>
  
  <pre><code>def to_param
    username
  end
  </code></pre>
  
  <p>Next, I want to link to a the name represented as a string that has white spaces. I want to replace the white spaces with <code>+</code> (plus) or something else more readable than standard <code>%20</code> replacement. </p>
  
  <p>I could handle these replacements (from space to <code>+</code>, and from <code>+</code> to space) in a method, but I was wondering if there is a better way of handling this.</p>