Merge pull request #174 from tsemana/fixes-posts-helper-namespacing

Fixes posts helper namespacing
This commit is contained in:
Philip Arndt 2012-01-19 13:02:11 -08:00
commit 3dbbbbfdda
2 changed files with 4 additions and 4 deletions

View file

@ -36,16 +36,16 @@ 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.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.archive_blog_posts_path(:year => year))
link_to(text, main_app.refinery_blog_archive_posts_path(:year => year))
end
end
end
end
end
end

View file

@ -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