From 4eb17bb58d6701a0fd4f2ac7c30c43927c514323 Mon Sep 17 00:00:00 2001 From: Tony Semana Date: Tue, 17 Jan 2012 15:17:43 -0500 Subject: Fixed to show the word 'blog' only once in route --- app/helpers/refinery/blog/posts_helper.rb | 4 ++-- config/routes.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/refinery/blog/posts_helper.rb b/app/helpers/refinery/blog/posts_helper.rb index 99acb48..49e5250 100644 --- a/app/helpers/refinery/blog/posts_helper.rb +++ b/app/helpers/refinery/blog/posts_helper.rb @@ -36,14 +36,14 @@ module Refinery count = Blog::Post.by_archive(Time.parse(post_date)).size text = t("date.month_names")[month.to_i] + " #{year} (#{count})" - link_to(text, main_app.refinery_blog_archive_blog_posts_path(:year => year, :month => month)) + link_to(text, main_app.refinery_blog_archive_posts_path(:year => year, :month => month)) else post_date = post.published_at.strftime('01/%Y') year = post_date.split('/')[1] count = Refinery::Blog::Post.by_year(Time.parse(post_date)).size text = "#{year} (#{count})" - link_to(text, main_app.refinery_blog_archive_blog_posts_path(:year => year)) + link_to(text, main_app.refinery_blog_archive_posts_path(:year => year)) end end end diff --git a/config/routes.rb b/config/routes.rb index aa8151e..3521af2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,7 +8,7 @@ Rails.application.routes.draw do 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 'archive/:year(/:month)', :to => 'posts#archive', :as => 'archive_posts' get 'tagged/:tag_id(/:tag_name)' => 'posts#tagged', :as => 'tagged_posts' end end -- cgit v1.2.3