Created
February 21, 2013 17:33
-
-
Save gogogarrett/5006539 to your computer and use it in GitHub Desktop.
How to namespace routes in RefineryCMS Engine to a resource outside of refinery.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Refinery::Core::Engine.routes.draw do | |
| # Frontend routes | |
| resources :core_topics do | |
| namespace :articles, :path => '/articles' do | |
| resources :articles, :path => '', :only => [:index, :show] | |
| end | |
| end | |
| # Admin routes | |
| namespace :articles, :path => '' do | |
| namespace :admin, :path => 'refinery' do | |
| resources :articles, :except => :show do | |
| collection do | |
| post :update_positions | |
| end | |
| end | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RefinerySpree::Application.routes.draw do | |
| resources :core_topics | |
| mount Refinery::Core::Engine, :at => '/' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment