###在Rails 3中,您可以执行以下操作:
Rails.application.routes.recognize_path "/accounts/1" # {:action=>"show", :controller=>"accounts", :id=>"1"}
ActionController::Routing::Routes.recognize_path("/accounts/1",:method=>:get)` # {:action=>"show":controller=>"accounts",:id=>"1"}
标签:show,URL,recognize,Rails,accounts,id,路由 From: https://www.cnblogs.com/hello-ruby/p/17424349.html