wblog/config/routes.rb

26 lines
498 B
Ruby
Raw Normal View History

2012-06-23 06:19:03 +08:00
WBlog::Application.routes.draw do
2012-06-23 09:42:37 +08:00
root :to => 'blogs#index'
2012-06-25 00:09:44 +08:00
resources :blogs, :only=>[:index, :show] do
collection do
get :rss
end
2014-03-30 22:14:59 +08:00
resources :comments, only: [:index, :create]
2012-06-25 00:09:44 +08:00
end
2014-03-30 22:14:59 +08:00
2014-03-30 08:16:38 +08:00
resources :archives
2012-06-25 00:09:44 +08:00
# photos
resources :photos, :only=>[:create]
namespace :admin do
2012-06-24 05:13:09 +08:00
resources :posts do
collection do
post :preview
end
end
end
2014-03-28 21:31:21 +08:00
get '/about' => 'home#index'
get '/admin' => 'admin/posts#new'
2014-03-30 08:54:02 +08:00
get '/:type' => 'archives#index'
2012-06-23 06:19:03 +08:00
end