Redmine 2 Plugin routes -
i create plugin redmine 2. how can use custom url in 'link_to' ?
plugins/my_plugin/config/routes.rb:
redmineapp::application.routes.draw match 'issue/:issue_id/something/:action/:id', to: 'something#new_some' end
actually, see url in 'rake routes', when try use on view, see 'no route matches' exception.
you need define route this:
redmineapp::application.routes.draw match 'issue/:issue_id/something/:action/:id', to: 'something#new_some', as: 'fancy_route' end
after make register route:
project_module :my_plugin permission :fancy_route, { :my_plugin => [:my_plugin] },:public => true end
Comments
Post a Comment