routes.rb:
resources :pages scope '/admin' do resources :pages end We get two paths site.com/pages and site.com/admin/pages which lead to the same controller pages_controller.rb . How in this controller to recognize what site.com/admin/pages is site.com/admin/pages . Where is the scope value stored? Parse the path to the presence of admin I think not the best solution?
The point is to give different views depending on the URL. Perhaps there is a better way? Can it be better to create 2 controllers pages_controller and admin_pages_controller ?