Actions
Feature #2142
closedChange the way plugin routes are integrated
Feature #2142:
Change the way plugin routes are integrated
Resolution:
Fixed
Description
Plugin's routes can today ( r1977 ) be handled thanks to a hook in the config/routes.rb :
class MyRoutes < Redmine::Hook::Listener
def routes(context)
context[:map].resources :mymodel
context[:map].connect 'mypath/:blah', :controller => 'mycontroller'
#etc.
end
end
Redmine::Hook.add_listener(MyRoutes)
Maybe it is possible to use Engines system to handle each plugin's routes, with "map.from_plugin" method :
- in config/routes.rb
It has been discussed here in the forum. Maybe it would be easier to use for plugin developpers, but I'm not 100% sure routes overriding will produce the same effect.
Actions