Merge pull request #174 from tsemana/fixes-posts-helper-namespacing
Fixes posts helper namespacing
This commit is contained in:
commit
3dbbbbfdda
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue