aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJérémy FRERE <frere.jeremy@gmail.com>2013-05-11 14:13:23 +0200
committerJérémy FRERE <frere.jeremy@gmail.com>2013-05-11 14:13:23 +0200
commitfdfb316bedc371028c3f637b77b9e1a277ea26d4 (patch)
tree611e2dc9e72460711d05d954e617151a1ffb2fbb /app/controllers
parent8a41b59d6e6d0a44f2db7d4afba80f96dc342bed (diff)
downloadrefinerycms-blog-fdfb316bedc371028c3f637b77b9e1a277ea26d4.tar.gz
refinerycms-blog-fdfb316bedc371028c3f637b77b9e1a277ea26d4.tar.bz2
refinerycms-blog-fdfb316bedc371028c3f637b77b9e1a277ea26d4.zip
Uses I18n.localize instead of strftime for posts#archives title and no_articles message
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/refinery/blog/posts_controller.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb
index b5caa33..999b49a 100644
--- a/app/controllers/refinery/blog/posts_controller.rb
+++ b/app/controllers/refinery/blog/posts_controller.rb
@@ -56,14 +56,14 @@ module Refinery
def archive
if params[:month].present?
date = "#{params[:month]}/#{params[:year]}"
- @archive_date = Time.parse(date)
- @date_title = @archive_date.strftime('%B %Y')
- @posts = Post.live.by_month(@archive_date).page(params[:page])
+ archive_date = Time.parse(date)
+ @date_title = ::I18n.l(archive_date, :format => '%B %Y')
+ @posts = Post.live.by_month(archive_date).page(params[:page])
else
date = "01/#{params[:year]}"
- @archive_date = Time.parse(date)
- @date_title = @archive_date.strftime('%Y')
- @posts = Post.live.by_year(@archive_date).page(params[:page])
+ archive_date = Time.parse(date)
+ @date_title = ::I18n.l(archive_date, :format => '%Y')
+ @posts = Post.live.by_year(archive_date).page(params[:page])
end
respond_with (@posts)
end