config/routes.rb in spud_blog-0.9.11 vs config/routes.rb in spud_blog-1.0.0.rc1
- old
+ new
@@ -18,11 +18,11 @@
resource :sitemap,:only => "show"
end
end
if Spud::Blog.config.blog_enabled
- scope Spud::Blog.config.blog_path do
+ scope (Spud::Blog.config.blog_path == '/' ? 'blog' : Spud::Blog.config.blog_path) do
# Blog Post Categories
get 'category/:category_url_name(/page/:page)',
:controller => 'blog',
:action => 'category',
@@ -55,11 +55,11 @@
end
end
end
if Spud::Blog.config.news_enabled
- scope Spud::Blog.config.news_path do
+ scope (Spud::Blog.config.news_path == '/' ? 'news' : Spud::Blog.config.news_path) do
# News Post Categories
get 'category/:category_url_name(/page/:page)',
:controller => 'news',
:action => 'category',
@@ -89,6 +89,11 @@
:defaults => {:page => 1}
resources :news_posts, :path => '/', :controller => 'news', :only => [:show]
end
end
+ if Spud::Blog.config.blog_path == '/'
+ root 'blog#index'
+ elsif Spud::Blog.config.news_path == '/'
+ root 'news#index'
+ end
end