Skip to content

Instantly share code, notes, and snippets.

@gogogarrett
Created February 21, 2013 17:33
Show Gist options
  • Select an option

  • Save gogogarrett/5006539 to your computer and use it in GitHub Desktop.

Select an option

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.
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
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