implemented forum post controller

This commit is contained in:
albert
2011-01-13 18:16:39 -05:00
parent 523cc9fe02
commit 541163685d
13 changed files with 121 additions and 42 deletions

View File

@@ -186,7 +186,8 @@ class User < ActiveRecord::Base
return false unless is_privileged?
newest_topic = ForumPost.first(:order => "updated_at desc", :select => "updated_at")
return false if newest_topic.nil?
return newest_topic.updated_at > user.last_forum_read_at
return true if last_forum_read_at.nil?
return newest_topic.updated_at > last_forum_read_at
end
end