title: Path parsing in rails
body: <p>I am looking for method for parsing route path like this:</p>
  
  <pre><code>ActionController::Routing.new("post_path").parse
  #=&gt; {:controller =&gt; "posts", :action =&gt; "index"}
  </code></pre>
  
  <p>It should be opposite to <code>url_for</code></p>
  
  <p><strong>Upd</strong><br />
  I've found out:
  <a href="https://stackoverflow.com/questions/2222522/what-is-the-opposite-of-url-for-in-rails-a-function-that-takes-a-path-and-genera">What is the opposite of url_for in Rails? A function that takes a path and generates the interpreted route?</a></p>
  
  <pre><code>ActionController::Routing::Routes.recognize_path("/posts")
  </code></pre>
  
  <p>So now I need to convert <code>posts_path</code> into "/posts"</p>