From 23785999f1f00a6ac0390a04efc06d76e9e3923d Mon Sep 17 00:00:00 2001 From: yanxd Date: Tue, 10 Dec 2013 20:36:19 +0800 Subject: [PATCH] fix fetch time --- app/helpers/welcome_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 83d6c4e17..a182a01c9 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -52,7 +52,7 @@ module WelcomeHelper end def topic_last_time topic - return topic.event_datetime unless topic.methods.to_s =~ %r[last_reply] + return topic.event_datetime if ( !(topic.methods.to_s =~ %r[last_reply]) && topic.last_reply.nil? ) topic.last_reply.event_datetime end