# Controller namespace causes wrong views to be rendered?

**URL:** <https://www.ruby-forum.com/t/controller-namespace-causes-wrong-views-to-be-rendered/116023>\
**Category:** Rails\
**Created:** [October 1, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/controller-namespace-causes-wrong-views-to-be-rendered/116023 "2007-10-01T18:21:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg\_Lappen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7bcc69/32.png) [@Greg\_Lappen](https://www.ruby-forum.com/u/Greg_Lappen)\
**Post date:** [October 1, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/controller-namespace-causes-wrong-views-to-be-rendered/116023/1 "2007-10-01T18:21:56Z")

</div>

I am having a strange problem on a couple sites I’ve built on Rails  
1.2. The issue is that I have two controllers with the same name,  
but in different namespaces. I have a controller called  
“PressReleasesController” on the front end, and another called  
“Admin::PressReleasesController”.

To get to the front one, [http://localhost:3000/press\_releases](http://localhost:3000/press_releases). To  
get to the admin on, [http://localhost:3000/admin/press\_releases](http://localhost:3000/admin/press_releases).

Everything works fine, but after some time, I start seeing the front-  
end views when I try to access the admin pages. In the log file, it  
shows

Processing PressReleasesController#index (for 67.81.184.70 at  
2007-10-01 08:35:31) [GET]  
Session ID: 833a01be56fea764d6191e3121739b36  
Parameters: {“action”=\>“index”, “controller”=\>“admin/press\_releases”}  
Rendering press\_releases/index

If I restart the app, it works again, and I see  
Processing PressReleasesController#index (for 67.81.184.70 at  
2007-10-01 08:39:01) [GET]  
Session ID: 833a01be56fea764d6191e3121739b36  
Parameters: {“action”=\>“index”, “controller”=\>“admin/press\_releases”}  
Cookie set: auth\_token=fb6d67ae1b75b6047140353104fc6a59c390de4e;  
path=/; expires=Mon, 15 Oct 2007 15:39:01 GMT  
Rendering layoutfalseactionlist within layouts/admin  
Rendering …/…/vendor/plugins/active\_scaffold/frontends/default/  
views/list

(I’m using activescaffold on the admin side…)

Has anyone else had this issue or have any advice? Thanks!

Greg
