aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 13:46:24 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2011-07-27 13:46:24 +0300
commit3fa8937b95a4d90000ad1be9c588424052136455 (patch)
tree07e61cd13bd88a76d13c3d759475d67d088d5f6e /config
parente5db679226bac7ef8ddd568c40f52addd52d7a8a (diff)
downloadrefinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.gz
refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.tar.bz2
refinerycms-blog-3fa8937b95a4d90000ad1be9c588424052136455.zip
Rails 3.1 - wip.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb70
1 files changed, 36 insertions, 34 deletions
diff --git a/config/routes.rb b/config/routes.rb
index e26fe64..6ba5186 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,45 +1,47 @@
::Refinery::Application.routes.draw do
- scope(:path => 'blog', :module => 'blog') do
- root :to => 'posts#index', :as => 'blog_root'
- match 'feed.rss', :to => 'posts#index', :as => 'blog_rss_feed', :defaults => {:format => "rss"}
- match ':id', :to => 'posts#show', :as => 'blog_post'
- match 'categories/:id', :to => 'categories#show', :as => 'blog_category'
- match ':id/comments', :to => 'posts#comment', :as => 'blog_post_blog_comments'
- get 'archive/:year(/:month)', :to => 'posts#archive', :as => 'archive_blog_posts'
- get 'tagged/:tag_id(/:tag_name)' => 'posts#tagged', :as => 'tagged_posts'
- end
+ scope(:module => 'refinery') do
+ scope(:path => 'blog', :module => 'blog') do
+ root :to => 'posts#index', :as => 'blog_root'
+ match 'feed.rss', :to => 'posts#index', :as => 'blog_rss_feed', :defaults => {:format => "rss"}
+ match ':id', :to => 'posts#show', :as => 'blog_post'
+ match 'categories/:id', :to => 'categories#show', :as => 'blog_category'
+ match ':id/comments', :to => 'posts#comment', :as => 'blog_post_blog_comments'
+ get 'archive/:year(/:month)', :to => 'posts#archive', :as => 'archive_blog_posts'
+ get 'tagged/:tag_id(/:tag_name)' => 'posts#tagged', :as => 'tagged_posts'
+ end
- scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
- scope(:path => 'blog', :as => 'blog', :module => 'blog') do
- root :to => 'posts#index'
- resources :posts do
- collection do
- get :uncategorized
- get :tags
+ scope(:path => 'refinery', :as => 'refinery_admin', :module => 'admin') do
+ scope(:path => 'blog', :as => 'blog', :module => 'blog') do
+ root :to => 'posts#index'
+ resources :posts do
+ collection do
+ get :uncategorized
+ get :tags
+ end
end
- end
- resources :categories
+ resources :categories
- resources :comments do
- collection do
- get :approved
- get :rejected
+ resources :comments do
+ collection do
+ get :approved
+ get :rejected
+ end
+ member do
+ get :approved
+ get :rejected
+ end
end
- member do
- get :approved
- get :rejected
- end
- end
- resources :settings do
- collection do
- get :notification_recipients
- post :notification_recipients
+ resources :settings do
+ collection do
+ get :notification_recipients
+ post :notification_recipients
- get :moderation
- get :comments
- get :teasers
+ get :moderation
+ get :comments
+ get :teasers
+ end
end
end
end