This project is archived and is in readonly mode.

Changeset [28016d33b0f2e668ca59a912c7fb2d777e3cf0a3] by Piotr Sarnacki

September 3rd, 2010 @ 09:59 PM

Use env['action_dispatch.routes'] to determine if we should generate prefix or not.

This technique is here to allow using routes from Engine in Application
and vice versa. When using Engine routes inside Application it should
generate prefix based on mount point. When using Engine routes inside
Engine it should use env['SCRIPT_NAME']. In any other case it should
generate prefix as env should not be even available.
http://github.com/rails/rails/commit/28016d33b0f2e668ca59a912c7fb2d...

Committed by Piotr Sarnacki

  • A actionpack/test/dispatch/prefix_generation_test.rb
  • M actionpack/lib/action_dispatch/routing/mapper.rb
  • M actionpack/lib/action_dispatch/routing/route_set.rb
  • M actionpack/lib/action_dispatch/routing/url_for.rb
  • M actionpack/test/controller/routing_test.rb

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>