routes.rb 511 Bytes
Newer Older
1
Refinery::Core::Engine.routes.draw do
Philip Arndt's avatar
Philip Arndt committed
2
  namespace :news do
3
    root :to => "items#index"
4
    get 'archive/:year(/:month)', :to => 'items#archive', :as => 'items_archive', :constraints => { :year => /\d{4}/, :month => /\d{1,2}/ }
5
    resources :items, :only => [:show, :index], :path => ''
Philip Arndt's avatar
Philip Arndt committed
6
  end
7

Philip Arndt's avatar
Philip Arndt committed
8
  namespace :news, :path => '' do
9
10
11
12
    namespace :admin, :path => 'refinery' do
      scope :path => 'news' do
        root :to => "items#index"
        resources :items, :except => :show
Philip Arndt's avatar
Philip Arndt committed
13
      end
14
    end
15
  end
16
end