This project is archived and is in readonly mode.
[PULLREQUEST] add support for specifying a file to load routes from in environment.rb
-
DHH
What is the use case for this feature?
Also, please always attach the patch to the ticket. We don't use pullrequest for one-offs (it's a hassle).
-
Scott Fleckenstein
The use case is when I have an 2 separated front-ends that rely on the same models, supporting library code, and plugins.
For example: getsatisfaction.com and api.getsatisfaction.com share models but not controllers/helpers/views. getsatisfaction.com goes away from rails conventions for improved SEO, while api adheres. At present, I selectively load which routes are needed in routes.rb itself, but it makes me feel gross. It's much nicer to simply set the appropriate routes file in the environment files used by the "api" or "app" configurations.
Also, IMO, it improves the readability of the methods in routeset.rb by removing some repeated invocations of "#{RAILS_ROOT}/config/routes.rb", but i'm not sure if you care about that :).
Sorry about the pull request, I wasn't sure about the etiquette.
Patch is now attached.
-
Repository
- State changed from new to resolved
(from [926f4648f0628009336c44f4d31019819434e39c]) Made the location of the routes file configurable with config.routes_configuration_file (Scott Fleckenstein) [#88 state:resolved]
