This project is archived and is in readonly mode.
Plugin routes override application routes
-
Nick Quaranto
+1 for this. During the process of converting Clearance to a Rails engine, we had to hack into the routes loading process so it was possible to override routes in the app's config/routes.rb with those set in the plugin.
The hack is the first tip listed here: http://giantrobots.thoughtbot.co...
-
adlongwell
+1 I'm working on a CMS plugin system that could really benefit from this.
-
Dan Croak
+1
-
jbasdf
- I've used the technique listed by here: Nick http://giantrobots.thoughtbot.com/2009/4/23/tips-for-writing-your-o.... It would be nice if that was the default.
-
Jason Ronallo
+1 We're running into this problem with the Blacklight plugin where different sites need the ability to override routes.
-
Bess
+1 Fixing this would really help us out for Blacklight: http://projectblacklight.org
-
Naomi Dushay
+1 to fix this - plugin route overrides are broken without this fix.
-
Francesc Esplugas
Maybe you want routes from the plugin to be loaded first or last. In my opinion there should be a convention to define which routes have to be defined at the beginning and which routes at the end.
Are you sure you want your routes to be loaded at the end if you have the default routes active? Some people doesn't remove them.
I've developed an engine called Typus (http://intraducibles.com/projects/typus) and a few months back some users complained about how routes worked because they where loaded after the routes of the application. Now routes are loaded normally with a :path_prefix and everything is working nice.
-
Mark Turner
+1
-
Eric Davis
+1 I'd like to see this as part of the core Rails because it makes building modular applications easier. I've built a small prototype of this as a plugin and it's working great with Redmine so far.
http://github.com/edavis10/prepend_engine_routes
Eric Davis
-
Matt Mitchell
+1 we need this!
-
Santiago Pastorino
- State changed from new to open
- Tag changed from 2.3.2, bug, engines, patch, plugin, route to 232, bug, engines, patch, plugin, route
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
