controller namespace causes wrong views to be rendered?

1 view
Skip to first unread message

Greg Lappen

unread,
Oct 1, 2007, 12:20:09 PM10/1/07
to Ruby on Rails: Talk
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. To
get to the admin on, 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


Reply all
Reply to author
Forward
0 new messages