Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
現在のコントローラーが何であるかを確認しようとはしていません。問題の URL は以前のリクエストを表しています。
例: 入力/foo/6
/foo/6
FooController出力: ( 、 action show、 idの Controller を示すハッシュ6)
FooController
show
6
見るrecognize_path
recognize_path
Rails.application.routes.recognize_path('/foo/6')
出力:
{:action=>"show", :controller="foo", :id="6"}