amethyst icon indicating copy to clipboard operation
amethyst copied to clipboard

Routing problem when controllers are included in a module

Open itang opened this issue 9 years ago • 0 comments

in this case:

module SomeModule
   class DictController < Base::Controller
     ...
   end
end


include SomeModule

...
get "/dict_index", "dict#index"   =>  Route.new("dict_index", "DictController",  "index")
register DictController  =>         @controllers_instances["SomeModule::DictController"] = SomeModule::DictController
...

When process named route, the "controller key" can't match

itang avatar Jul 12 '15 04:07 itang