Rails3 compat.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8459 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-01-01 17:58:14 +00:00
parent cd256fe89f
commit 1f6764e2af
1 changed files with 4 additions and 1 deletions

View File

@ -137,7 +137,10 @@ class WikiPage < ActiveRecord::Base
unless @updated_on
if time = read_attribute(:updated_on)
# content updated_on was eager loaded with the page
@updated_on = Time.parse(time) rescue nil
begin
@updated_on = Time.zone ? Time.zone.parse(time.to_s) : Time.parse(time.to_s)
rescue
end
else
@updated_on = content && content.updated_on
end