This project is archived and is in readonly mode.

#88 ✓resolved
Scott Fleckenstein

[PULLREQUEST] add support for specifying a file to load routes from in environment.rb

Reported by Scott Fleckenstein | May 1st, 2008 @ 09:38 PM

This commit adds in the ability to specify a routes_configuration_file in your Rails configuration, which will be used in place of config/routes.rb

Comments and changes to this ticket

  • DHH

    DHH May 1st, 2008 @ 10:29 PM

    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

    Scott Fleckenstein May 1st, 2008 @ 10:41 PM

    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: and share models but not controllers/helpers/views. 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

    Repository May 1st, 2008 @ 11:27 PM

    • 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]

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket