Bug in nested routes translation

73 views
Skip to first unread message

krzysztof.wawer

unread,
Dec 20, 2011, 5:08:21 PM12/20/11
to I18n Routing
My routes.rb looks like:

resources :editions do
resources :units, :only => [:index]
end

And when I fired rake routes in consol. I get something like this:

admin_edition_en_editions GET /:i18n_locale/admin/
editions/:edition_id/editions(.:format)
{:i18n_locale=>"en", :action=>"index", :controller=>"admin/unit"}
admin_edition_unit_index GET /:i18n_locale/admin/
editions/:edition_id/unit(.:format)
{:action=>"index", :controller=>"admin/unit"}

So of course it is bug in translation because in translated routes we
should have something like this:
admin_edition_en_unit_index GET /:i18n_locale/admin/
editions/:edition_id/unit(.:format)
{:i18n_locale=>"en", :action=>"index", :controller=>"admin/unit"}
Reply all
Reply to author
Forward
0 new messages