This is somewhat uncommon, but to get the routing hash from a URL string:
ActionController::Routing::Routes.recognize_path('/users/1')
# => {:controller => 'users', :action => 'show', :id => '1' }
Subscribe to:
Post Comments (Atom)
Politics, Computers, Ruby on Rails, and Miscellaneous.
4 comments:
This is great! Thanks a lot!
Thank you. It's people like you that make coding pleasant.
THX!!!!
You are my sunshine. My only sunshine. You make me happy when skies are blue.
Post a Comment