How are your routes, I have a similar setup, in your routes you should
have something like
map.namespace :admin do |admin|
admin.resources :pages
end
Then the routes can be looked up in using rake routes - should be
fairly straight forward
Should look like
admin_pages GET /admin/pages(.:format)
{:action=>"index", :controller=>"admin/pages"}
POST /admin/pages(.:format)
{:action=>"create", :controller=>"admin/pages"}
new_admin_page GET /admin/pages/new(.:format)
{:action=>"new", :controller=>"admin/pages"}
edit_admin_page GET /admin/pages/:id/edit(.:format)
{:action=>"edit", :controller=>"admin/pages"}
admin_page GET /admin/pages/:id(.:format)
{:action=>"show", :controller=>"admin/pages"}
PUT /admin/pages/:id(.:format)
{:action=>"update", :controller=>"admin/pages"}
DELETE /admin/pages/:id(.:format)
{:action=>"destroy", :controller=>"admin/pages"}
-excuse the formatting
Cheers
--
Richard
Web Developer in Japan
http://mackstar.com
On Nov 20, 10:14 am, Brent
<wejrow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''m building a CMS. It works great, but I wanted to make the
> controllers use a sub directory /admin/. So all I did was add admin::
> in front of each controller.
>
> It works. But since I did that, the only way to show a page is by
> going to:
>
> /admin/pages/show/1
>
> NOT
>
> admin/pages/1
>
> If I go to "admin/pages/1" I get this error:
>
> Unknown action
>
> No action responded to 1. Actions: create, destroy, edit, index, new,
> show, show_slug, and update
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=.