Rails: Check output of path helper from console
Solution 1:
You can show them with rake routes
directly.
In a Rails console, you can call app.post_path
. This will work in Rails ~= 2.3 and >= 3.1.0.
Solution 2:
you can also
include Rails.application.routes.url_helpers
from inside a console sessions to access the helpers:
url_for controller: :users, only_path: true
users_path
# => '/users'
or
Rails.application.routes.url_helpers.users_path