aboutsummaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb25
1 files changed, 16 insertions, 9 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 353d0b8..aa8151e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,16 +1,23 @@
Rails.application.routes.draw do
- 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'
+ namespace :refinery, :path => '' do
+ namespace :blog do
+ root :to => "posts#index"
+
+ resources :posts, :only => [:show]
+
+ match 'feed.rss', :to => 'posts#index', :as => 'rss_feed', :defaults => {:format => "rss"}
+ match 'categories/:id', :to => 'categories#show', :as => 'category'
+ match ':id/comments', :to => 'posts#comment', :as => 'comments'
get 'archive/:year(/:month)', :to => 'posts#archive', :as => 'archive_blog_posts'
get 'tagged/:tag_id(/:tag_name)' => 'posts#tagged', :as => 'tagged_posts'
+ end
+ end
+
+ namespace :refinery do
+ namespace :blog do
+ namespace :admin, :path =>'' do
+ root :to => "posts#index"
- scope(:path => 'refinery', :as => 'refinery_admin', :module => 'admin') do
- root :to => 'posts#index'
resources :posts do
collection do
get :uncategorized