Path of a Main controller which is part of a module

11 views
Skip to first unread message

John

unread,
Feb 13, 2017, 3:54:48 AM2/13/17
to Ramaze

Hi all

Is it always true that the path of a MyModule::MainController will by default have to be '/mymodule/' as opposed to '/' and that its views will need to be under 'view/mymodule' ?
Was it always that way? I am asking, because I'm porting some legacy code and I can't see if/when this changed since 2009.

For example:

module Trial
  class MainController < Controller
  ...
end

will have its views under view/trial and  MainController.r() will be '/trial' 

If you want the Trial::MainController to be accessible at the root ('/'), Is the best way to change it using map '/' inside the MainController  (like you'd do with controllers, which are not part of a module)?

cheers
/pagojo
Reply all
Reply to author
Forward
0 new messages