Answers for "rails get current route"

2

rails get current path

request.url
# => "http://localhost:3000/lists/7/items"
request.path
# => "/lists/7/items"
Posted by: Guest on April-14-2020
2

check current route rails

current_uri = request.env['PATH_INFO']
Posted by: Guest on March-12-2021

Browse Popular Code Answers by Language