# Rails 3 routes admin section

**URL:** <https://www.ruby-forum.com/t/rails-3-routes-admin-section/195256>\
**Category:** Rails\
**Created:** [September 20, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/rails-3-routes-admin-section/195256 "2010-09-20T16:56:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jamal](https://www.ruby-forum.com/u/jamal)\
**Post date:** [September 20, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/rails-3-routes-admin-section/195256/1 "2010-09-20T16:56:46Z")

</div>

Hello,

I’m trying to re-create the old route to the new route method in Rails  
3, but i cannot figure out how to do it.

scope :admin, :name\_prefix =\> “admin” do  
resources :accounts, :users  
end

this doesn’t give me “admin\_controller” for “admin” path

and not “/admin/accounts” path for the resources

resources :admin do  
resources :accounts, :users  
end

this doesn’t fix the issue since it create those urls

admin/:admin\_id/accounts etc.

namespace :admin do  
resources :accounts, :users  
end

neither this one, since it doesn’t allow me to have “admin\_controller”

I hope you know what i need for now 😃

Thanks for any help…
