This project is archived and is in readonly mode.
Changeset [28016d33b0f2e668ca59a912c7fb2d777e3cf0a3] by Piotr Sarnacki
Revision 28016d33b0f2e668ca59a912c7fb2d777e3cf0a3,
committed 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...
5 changed files
-
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