title: How to handle dot character in Rails resources routes?
body: <p>I want to have SEO optimized urls like this</p>
  
  <pre><code>http://example.com/sites/1-blau.de/plans
  </code></pre>
  
  <p>But the dot in the path cause Rails to chock. How do I escape dots to percentage notation form so it can work?</p>
  
  <p>My routes:</p>
  
  <pre><code>resources :sites, only: [] do
    resources :plans, only: [:index, :show] do
    end
  end
  </code></pre>
  
  <p>I have tried URI.escape and CGI.escape, neither worked.</p>
  
  <pre><code>URI.escape('a.b')=&gt; "a.b"
  CGI.escape('a.b')=&gt; "a.b"
  </code></pre>
  
  <p>What I thought I wanted</p>
  
  <pre><code>Foo.escape('a.b')=&gt; "a%2Eb"
  </code></pre>