浏览代码

Fix Postgres/sqlite type error by using Postgres, closes #7

tags/last-sinatra-version
Adrian Short 12 年前
父节点
当前提交
6883b77410
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      views/candidate.haml

+ 2
- 2
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']}" }


正在加载...
取消
保存