config/routes.rb in santey_blog-0.1.2 vs config/routes.rb in santey_blog-0.2.0

- old
+ new

@@ -1,10 +1,27 @@ Rails.application.routes.draw do |map| - match "/:year/:month/:day/:id" => "posts#show", :constraints => { :year => /\d{4}/, :month => /\d{2}/, :day => /\d{2}/ } - match "/:year(/:month(/:day))" => "posts#index", :constraints => { :year => /\d{4}/, :month => /\d{2}/, :day => /\d{2}/ } - match "/tag/:id" => 'posts#tag' - resources :posts + match 'login' => 'user_sessions#new' + match 'logout' => 'user_sessions#destroy' + match 'signup' => 'users#new' + #match 'sitemap(.:format)' => 'pages#sitemap' - root :to => "posts#index" + resources :users + resource :user_session + + match "/:year/:month/:day/:id" => "sb/posts#show", :constraints => { :year => /\d{4}/, :month => /\d{2}/, :day => /\d{2}/ } + match "/:year(/:month(/:day))" => "sb/posts#index", :constraints => { :year => /\d{4}/, :month => /\d{2}/, :day => /\d{2}/ } + match "/tag/:id" => 'sb/posts#tag' + + match 'admin' => 'sb/admin/posts#index' + namespace :sb do + resources :posts + namespace :admin do + resources :posts do + get :publish, :on => :member + end + end + end + + root :to => "sb/posts#index" end