0

Is it possible to prefix or group routes (for a component maybe) Something like

prefix '/admin' do client '/users' , component:'admin', controller: 'users', action:'index' end

Cheers, Kevin

kev97444
  • 21
  • 1

1 Answers1

1

Not at the moment. I'm probably going to rework routes at some point to do something like this. Right now its a little verbose. Probably I'm going to have it where components can be mounted at prefixes, then all of the routes in their route file go below that prefix. That way you can change where components mount outside of the component itself. Might be a little while before I get to it though. (PR's welcome if your feeling ambitious, hit me up on gitter first though - @ryanstout)

Ryan
  • 956
  • 7
  • 8
  • Does this mean that it's not possible to configure a Volt application to live under a "sub-path". E.g. if I have an Nginx server which passes the traffic to http://hostname/path/to/my/volt/server/ – Anders Hansson Dec 02 '15 at 22:42
  • 1
    Not at the moment, its a somewhat easy change, sorry I just haven't gotten around to it yet. – Ryan Dec 03 '15 at 23:21