ちょっと技術的な問題。
最近Rails3.0を踏まえてもどってきたのだが、時代は変わった。JavaScriptに3ヶ月ぐらい浮気していただけなんだけれど。
それで、Redmineは相変わらず2.3ベースなんだけれど、Rails 3.0を踏まえてgemにi18n (0.4.1)が入ってきたのでRedmineでエラーが出てくるようになった。
app/helpers/application_helper.rb に以下の行を、privateメソッドの前に追加して回避した。
[ruby]
def format_date(date)
return nil unless date
date.strftime(Setting.date_format)
end
def format_time(time, include_date = true)
return nil unless time
time = time.to_time if time.is_a?(String)
zone = User.current.time_zone
local = zone ? time.in_time_zone(zone) : (time.utc? ? time.localtime : time)
((include_date ? “#{format_date(time)} ” : “”) + “#{local.strftime(Setting.time_format)}”)
end
[/ruby]