Skip to content

Commit

Permalink
fix date bug in posts
Browse files Browse the repository at this point in the history
  • Loading branch information
therod committed Nov 3, 2015
1 parent d926bc6 commit d51ca67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/data/posts/2014-05-06-new-site.md
@@ -1,5 +1,6 @@
---
title: "Rails Girls Switzerland has a new face!"
date: "2014-03-01"
---
We are happy to announce that we were finally able to rework the official Rails Girls Switzerland page!

Expand Down
2 changes: 1 addition & 1 deletion app/models/post.rb
Expand Up @@ -58,7 +58,7 @@ def previous_post
end

def date
@date ||= Time.zone.parse(metadata[:date] || @date_str).to_date
@date ||= metadata[:date].to_date
end

delegate :year, :month, :day, :to => :date
Expand Down

0 comments on commit d51ca67

Please sign in to comment.