aboutsummaryrefslogtreecommitdiffstats
path: root/config/routes.rb
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2012-01-17 16:56:03 +1300
committerPhilip Arndt <parndt@gmail.com>2012-01-17 16:56:24 +1300
commitb1e4fd00943a160f3eb6ce242463c0cc07a406fc (patch)
tree07fb750aa580b63d39c23589997956bf3a03594d /config/routes.rb
parentb3a25c1b686d205fc6b8b409a8f90059ae6b934d (diff)
downloadrefinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.tar.gz
refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.tar.bz2
refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.zip
Fixed namespacing for Refinery conventions.
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