aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorMarcelo Griggio Cajueiro <marcelocajueiro@gmail.com>2010-12-30 14:58:22 -0200
committerMarcelo Griggio Cajueiro <marcelocajueiro@gmail.com>2010-12-30 14:58:22 -0200
commit4a3a0fe250fb63b0a11882062e2e7ec057e10333 (patch)
treefcca89a6ffab76db8cd43d666c5f430937fe2835 /app/views
parentff0bd433c5a8d332cc8630cad8732ece57408320 (diff)
downloadrefinerycms-blog-4a3a0fe250fb63b0a11882062e2e7ec057e10333.tar.gz
refinerycms-blog-4a3a0fe250fb63b0a11882062e2e7ec057e10333.tar.bz2
refinerycms-blog-4a3a0fe250fb63b0a11882062e2e7ec057e10333.zip
Use i18n to display the post created_at.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/blog/posts/_post.html.erb4
-rw-r--r--app/views/blog/shared/_post.html.erb4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/blog/posts/_post.html.erb b/app/views/blog/posts/_post.html.erb
index d9535e9..6a16631 100644
--- a/app/views/blog/posts/_post.html.erb
+++ b/app/views/blog/posts/_post.html.erb
@@ -7,8 +7,8 @@
<header>
<h1><%= @blog_post.title %></h1>
<details>
- <time datetime="<%= @blog_post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
- <%= t('blog.shared.posts.created_at', :when => @blog_post.published_at.strftime('%d %B %Y')) %>.
+ <time datetime="<%=l @blog_post.published_at.to_date, :format => :default %>" class='posted_at'>
+ <%= t('blog.shared.posts.created_at', :when => l(@blog_post.published_at.to_date, :format => :short)) %>.
</time>
<% if (categories = @blog_post.categories).any? %>
<aside class='filed_in'>
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index 7b243a0..16483a5 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -3,8 +3,8 @@
<header>
<h1><%= link_to post.title, blog_post_url(post) %></h1>
<details>
- <time datetime="<%= post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
- <%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>.
+ <time datetime="<%=l post.published_at.to_date, :format => :default %>" class='posted_at'>
+ <%= t('blog.shared.posts.created_at', :when => l(post.published_at.to_date, :format => :short)) %>.
</time>
<% if (categories = post.categories).any? %>
<aside class='filed_in'>