Rails 2.0 map.namespace and path_prefix

Hi!

I’m trying set up new routing in rails 2.0 and have 1 problem

map.namespace :admin do |admin|
admin.resources :permissions, :path_prefix => ‘/:lang’
end

i want have addres like this:

http://site.com/en/admin/permissions

also i tested:

map.with_options :path_prefix => ‘/:lang’ do |lang|
lang.namespace :admin do |admin|
admin.resources :permissions
end
end

its still not map http://site.com/en/admin/permissions

Ok i find answer :slight_smile:

map.with_options :path_prefix => ‘/:lang/admin’ do |lang|
lang.namespace :admin do |admin|
admin.resources :permissions
end
end

not sure if it is feature or bug :))

Grzegorz Derebecki wrote:

Ok i find answer :slight_smile:

map.with_options :path_prefix => ‘/:lang/admin’ do |lang|
lang.namespace :admin do |admin|
admin.resources :permissions
end
end

not sure if it is feature or bug :))

Thanks! It worked.