Problems with _path and _url helpers using namespaced controller

I am using a namespaced controller as described here

When using:

map.with_options(:namespace => “admin”) do |admin|
admin.resources :photos, :videos end

and then attempting to use the path/url helper new_photo_path it links
to photos/new instead of admin/photos/new as expected.

How can I acheive the expected behavior?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs