From 6883b7741099638067071e0266ff2d3550c52a39 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Tue, 12 Feb 2013 00:52:08 +0000 Subject: [PATCH] Fix Postgres/sqlite type error by using Postgres, closes #7 --- views/candidate.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/candidate.haml b/views/candidate.haml index 330b71b..9825a8e 100644 --- a/views/candidate.haml +++ b/views/candidate.haml @@ -22,8 +22,8 @@ %td{ :style => "background-color: #{ccy['party_colour']}" }   %td %a{ :href => "/bodies/#{ccy['body_slug']}/elections/#{ccy['d']}" } - - bits = ccy['d'].split("-") - = long_date(Time.mktime(bits[0], bits[1], bits[2])) + -# Postgres returns ccy['d'] as a Date and sqlite returns it as a String + = long_date(ccy['d'].to_time) %td= ccy['party_name'] %td %a{ :href => "/bodies/#{ccy['body_slug']}" }