diff options
author | Philip Arndt <parndt@gmail.com> | 2010-09-03 23:32:07 +1200 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2010-09-03 23:32:07 +1200 |
commit | a2f655b55eb30a900020e8aff9601ed0606ce58f (patch) | |
tree | d57cf7aef6ae36a4751144587fab7fe2e508d491 /config | |
parent | c4222bfdf5733d1552a2ecf4468d89cf89a583b1 (diff) | |
download | refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.gz refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.tar.bz2 refinerycms-blog-a2f655b55eb30a900020e8aff9601ed0606ce58f.zip |
Hello rails3 support.
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/config/routes.rb b/config/routes.rb index ce4a2ef..70406de 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,9 +8,9 @@ if Rails.version < '3.0.0' map.namespace(:admin, :path_prefix => 'refinery') do |admin| admin.namespace :blog do |blog| blog.resources :posts - + blog.resources :categories - + blog.resources :comments, :collection => { :approved => :get, :rejected => :get @@ -18,7 +18,7 @@ if Rails.version < '3.0.0' :approved => :get, :rejected => :get } - + blog.resources :settings, :collection => { :notification_recipients => [:get, :post], :moderation => :get @@ -27,5 +27,40 @@ if Rails.version < '3.0.0' end end else - # route for rails3 here. + Refinery::Application.routes.draw do + match '/blog', :to => 'blog_posts#index', :as => 'blog_post' + match '/blog/:id', :to => 'blog_posts#show', :as => 'blog_post' + + match '/blog/categories/:category_id', :to => 'blog_posts#index', :as => 'blog_category' + match '/blog/:id/comments', :to => 'blog_posts#comment', :as => 'blog_post_blog_comments' + + scope(:path => 'refinery', :as => 'admin', :module => 'admin') do + scope(:path => 'blog', :name_prefix => 'admin', :as => 'blog', :module => 'blog') do + root :to => 'posts#index' + resources :posts + + resources :categories + + resources :comments do + collection do + get :approved + get :rejected + end + member do + get :approved + get :rejected + end + end + + resources :settings do + collection do + get :notification_recipients + post :notification_recipients + + get :moderation + end + end + end + end + end end
\ No newline at end of file |