Hi!
I’m trying to fix the bug, that polymorphic_url can’t generate the url for resources with a path_prefix with params in it. This is a pretty annoying but, since path_prefix is a good solution to carry the locale (e.g.: :path_prefix => “:locale” → /en/acticles).
I wrote a test and fixed the problem (I now give a Hash to the generated path method), but I also broke some other tests. Actually I’m not sure if it’s my fault or a problem of those tests, as some of them use mocked models. I tried now for several hours to fix these problems, but didn’t managed to fix all. Can someone help me?
The patch is meant to be applied in the actionpack directory.
Actually, I don’t think my solution is very pretty. If someone comes up with a better solution, I’m fine with that.
Regards, Johannes
patch (2.43 KB)