Forum: Ruby on Rails Keeping Admin Code Seperate

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9a55844258b2343f15dbafbcdcc14125?d=identicon&s=25 Cyrus Dev (cyrus)
on 2008-10-09 08:59
(Received via mailing list)
Hello All,

Can anybody suggest me in rails how to keep admin code seperate  from
front end...?
23e4fc3add5443f51e55663cfc245d24?d=identicon&s=25 Erol Fornoles (Guest)
on 2008-10-09 11:26
(Received via mailing list)
On Oct 9, 12:10 pm, cyrusdev08 <cyrusde...@gmail.com> wrote:
> Hello All,
>
> Can anybody suggest me in rails how to keep admin code seperate  from
> front end...?

One way is to use namespaced controllers. For example:

script/generate controller Admin::Users

Will automatically give you a route of /admin/users (if you're using
the default routes) or allow you to specify a route of:

map.namespace :admin do |admin|
  admin.resources :users
end
This topic is locked and can not be replied to.