I need to know, from inside of a layout of a mountable engine, what path it\'s currently being mounted on. What would be the way to do it?
E.g. my routes.rb contains the
You could simply use the following code to tell what path engine is mount to inside an engine controller/view:
env["SCRIPT_NAME"] # => "/backend"