This project is archived and is in readonly mode.
route generation fails with :module written in Symbol
-
Andrew White
Daisuke, the same problem occurs in the nested scope as well - can you fix it there and upload a new patch (with extra tests for the nested scope)?
Failing routes:
scope(:module => :admin) do resources :products do resources :images end end -
Andrew White
- Assigned user set to Jeremy Kemper
Actually, don't bother Daisuke - this is actually a symptom of a deeper problem. I was using :module to try and determine the shallow path and name prefix. As your example illustrates :module may not actually be part of the namespace so it needs to be fixed in a different way.
The attached patch fixes this problem by tracking the shallow path and name prefix properly and modifies an existing test route to use a symbol for :module so that we don't get a regression.
-
Repository
- State changed from new to resolved
(from [1f84061c5c271647dc5f7f1311e365e134130e0f]) Don't use module to work out shallow name prefix and path as it may not accurately reflect the actual namespace [#4899 route generation fails with :module written in Symbol state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/1f84061c5c271647dc5f7f1311e365...
