diff options
author | djones <dgjones@gmail.com> | 2010-09-14 15:02:02 +1200 |
---|---|---|
committer | djones <dgjones@gmail.com> | 2010-09-14 15:02:02 +1200 |
commit | 4a5e2ec52e5b346858738990c05ab45812f9bf78 (patch) | |
tree | 172d2220e7f497d57316cf0936947cf99455d564 /config | |
parent | dcad55e29197ab2ccb610ce381da90e1c18d182c (diff) | |
download | refinerycms-blog-4a5e2ec52e5b346858738990c05ab45812f9bf78.tar.gz refinerycms-blog-4a5e2ec52e5b346858738990c05ab45812f9bf78.tar.bz2 refinerycms-blog-4a5e2ec52e5b346858738990c05ab45812f9bf78.zip |
add rss support
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb index 01be470..a0c1f94 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,11 @@ if Rails.version < '3.0.0' ActionController::Routing::Routes.draw do |map| map.namespace(:blog) do |blog| + blog.rss_feed 'feed.rss', :controller => 'posts', :action => 'index', :format => 'rss' blog.root :controller => "posts", :action => 'index' - blog.post '/blog/:id', :controller => "posts", :action => 'show' - blog.category '/blog/categories/:id', :controller => "categories", :action => 'show' - blog.post_blog_comments '/blog/:id/comments', :controller => 'posts', :action => 'comment' + blog.post ':id', :controller => "posts", :action => 'show' + blog.category 'categories/:id', :controller => "categories", :action => 'show' + blog.post_blog_comments ':id/comments', :controller => 'posts', :action => 'comment' end map.namespace(:admin, :path_prefix => 'refinery') do |admin| @@ -32,6 +33,7 @@ else Refinery::Application.routes.draw do scope(:path => 'blog', :module => 'blog') do root :to => 'posts#index' + match 'feed.rss', :to => 'posts#index.rss', :as => 'rss_feed' 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' |