add last activity to forums

This commit is contained in:
jomo
2014-05-10 01:48:43 +02:00
parent 4a52398a97
commit 35c85c2993
4 changed files with 30 additions and 2 deletions

View File

@@ -12,6 +12,10 @@ class Forum < ActiveRecord::Base
forumgroup
end
def threads
forumthreads
end
def can_read?(user)
group.can_read?(user) && (role_read.nil? || (!user.nil? && user.role >= role_read))
end