wblog/config/routes.rb

35 lines
753 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'
2014-03-30 23:10:26 +08:00
2014-04-01 19:43:48 +08:00
resources :blogs, :only=>[:index, :show, :edit] do
2012-06-25 00:09:44 +08:00
collection do
get :rss
end
2014-03-30 22:14:59 +08:00
resources :comments, only: [:index, :create]
resources :likes, only: [:index, :create, :destroy] do
member do
get :is_liked
end
end
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
2014-04-02 12:45:29 +08:00
resources :photos, only: [:create]
get '/qrcodes' => 'qrcodes#show'
2012-06-25 00:09:44 +08:00
namespace :admin do
2012-06-24 05:13:09 +08:00
resources :posts do
collection do
post :preview
end
end
2014-04-01 08:28:21 +08:00
resources :sessions, :only=>[:new, :create, :destroy]
2014-03-31 16:06:15 +08:00
root to: 'dashboard#index'
end
2014-04-01 08:28:21 +08:00
2014-03-28 21:31:21 +08:00
get '/about' => 'home#index'
2014-04-02 15:43:45 +08:00
get '/:type' => 'archives#index', constraints: { type: /tech|life|creator/ }
2012-06-23 06:19:03 +08:00
end