wblog/config/routes.rb

40 lines
851 B
Ruby
Raw Normal View History

2012-06-23 06:19:03 +08:00
WBlog::Application.routes.draw do
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
2016-04-26 00:20:14 +08:00
resources :subscribes, only: [:index, :new, :create]
resources :unsubscribes, only: [:index, :new, :create]
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'
2016-04-20 23:36:51 +08:00
namespace :admin do
resources :posts, except: [:show] do
2012-06-24 05:13:09 +08:00
collection do
post :preview
end
2014-05-25 10:33:28 +08:00
resources :comments
2012-06-24 05:13:09 +08:00
end
2014-04-01 08:28:21 +08:00
resources :sessions, :only=>[:new, :create, :destroy]
2016-04-20 23:36:51 +08:00
root 'dashboard#index'
end
2014-04-01 08:28:21 +08:00
2014-03-28 21:31:21 +08:00
get '/about' => 'home#index'
2014-12-26 01:58:26 +08:00
get '/mobile' => 'home#mobile'
2016-04-20 23:36:51 +08:00
root 'blogs#index'
2012-06-23 06:19:03 +08:00
end