How do you use ActionDispatch::Routing::RouteSet recognize_path?
I want to get the current path for the view.
I tried <div id="<%= ActionDispatch::Routing::RouteSet::recognize_path %>">
but got "undefined method `recognize_path' for ActionDispatch::Routing::RouteSet:Class".
Thanks!
You can do this
Rails.application.routes.recognize_path "/your/path"
It works in rails 3.1.0.rc4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With