rails check route code example
Example 1: rails get current path
request.url
# => "http://localhost:3000/lists/7/items"
request.path
# => "/lists/7/items"
Example 2: rails all path
# in terminal:
rails routes # => List all your routes
# If you want to select
rails routes | grep yourModelName..