# Problems with \_path and \_url helpers using namespaced controller

**URL:** <https://www.ruby-forum.com/t/problems-with-path-and-url-helpers-using-namespaced-controller/187928>\
**Category:** Rails\
**Created:** [May 2, 2010, 12:05pm UTC](https://www.ruby-forum.com/t/problems-with-path-and-url-helpers-using-namespaced-controller/187928 "2010-05-02T12:05:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![re5et](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@re5et](https://www.ruby-forum.com/u/re5et)\
**Post date:** [May 2, 2010, 12:05pm UTC](https://www.ruby-forum.com/t/problems-with-path-and-url-helpers-using-namespaced-controller/187928/1 "2010-05-02T12:05:25Z")

</div>

I am using a namespaced controller as described here

> **[Rails Routing from the Outside In — Ruby on Rails Guides](https://guides.rubyonrails.org/routing.html#controller-namespaces-and-routing)**
>
> Rails Routing from the Outside InThis guide covers the user-facing features of Rails routing.After reading this guide, you will know: How to interpret the code in config/routes.rb. How to construct your own routes, using either the preferred...

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?
