rails/rails — pull request #6854 by piglop (2012-06-25 17:26:21+00:00)
Title: Engine mounted scope change

Within an engine mounted in a dynamic scope, I'm trying to make an link to the same action but another scope (ie. changing the dynamic part of the scope) and it doesn't work.

I need this to build a link to the current page in another locale. The scope defines the locale, and the current page is handled by the engine.

I wrote a failing test to demonstrate the current behavior, which doesn't work. Rails generates an URL with the new scope in the query string, and the old scope in the path.

Is there another way to change the dynamic scope inside the engine ?
Or is this a bug that should be fixed ?

The output is:
"/more-awesomeness/blog/link_to_another_scope" expected but was
"/some-awesomeness/blog/link_to_another_scope?omg=more-awesomeness"