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.
Cyrus D. (Guest)
on 2008-10-09 10:59
(Received via mailing list)
Hello All,

Can anybody suggest me in rails how to keep admin code seperate  from
front end...?
Erol F. (Guest)
on 2008-10-09 13:26
(Received via mailing list)
On Oct 9, 12:10 pm, cyrusdev08 <removed_email_address@domain.invalid> 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.