aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb43
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