hello,
i have a rails 3 engine scoped dynamically like this:
scope “/:locale” do
mount MyEngine::Engine => ‘’, :as => ‘my_engine’
end
I can’t seem to be able to set my own locale like this:
my_engine.page_path(page, :locale => ‘de’)
the path is generated like this:
/en/page/12345?locale=de
instead of simply:
/de/page/12345
Any suggestions how to do this correcly?
Thank you!
I route my engines using my own custom mount so I don’t do it the normal
way you listed above. However, and this is untested, you should be able
to scope the :path. You can try below:
scope “/:locale” do
scope :path => ‘/’ do
mount MyEngine::Engine => ‘’, :as => ‘my_engine’
end
end
Let me know if that works…
Hi
I have at the moment the same problem as you.
Have you found a solution for it?
Thanks in advance for your help!
Roman
Am Samstag, 4. Juni 2011 10:31:14 UTC+2 schrieb Tomas Celizna: