With Rails 4 and I18n.
When i call path like
conversation_path(locale: :de, 1)
it gives me an error saying
No route matches {:action=>"show", :controller=>"frontend/conversations", :id=>1, :locale=>:de} missing required keys: [:locale]
routes.rb
scope '/:locale' do
localized do
scope module: 'frontend' do
resources :conversations, only: [:index, :show]
end
end
end
rake routes gives me
conversation_de GET /:locale/conversations/:id(.:format) frontend/conversations#show {:locale=>"de"}
conversation_en GET /:locale/conversations/:id(.:format) frontend/conversations#show {:locale=>"en"}
am i missing something?
Try to change in routes.rb
to: