I am working on some Rails internals and have a place where given a ActionDispatch::Journey::Route object, I need the path prefix.
If I run this:
pp route.path.spec.to_s
I get this:
/my-endpoint(.:format)
But the full path is missing and I need the stuff in the parenthesis omitted, so with this route being mounted at /api
, I need this in stead:
/api/my-endpoint