fixes #2108, upgrade to postgresql 9.3, fix tests

This commit is contained in:
r888888888
2014-04-11 14:15:14 -07:00
parent e46d467f64
commit 7edcbf33dd
4 changed files with 278 additions and 199 deletions

View File

@@ -106,7 +106,7 @@ class ForumTopic < ActiveRecord::Base
end
def read_by?(user, read_forum_topic_ids)
return true if updated_at < user.last_forum_read_at
return true if user.last_forum_read_at && updated_at < user.last_forum_read_at
if read_forum_topic_ids.any? {|topic_id, timestamp| id.to_s == topic_id && updated_at.to_i > timestamp.to_i}
return false
end