Sha256: 481d40016eac3079f68cf4ffe4d0cb0673555a7f783a96c087a1ed6ad77645f1
Contents?: true
Size: 389 Bytes
Versions: 16
Compression:
Stored size: 389 Bytes
Contents
class ForumCategory < Category has_many :forums, :dependent => :destroy # Are any of the forums readable by this user? One positive is all need... #------------------------------------------------------------------------------ def any_readable_forums?(user) if user && user.is_admin? true else forums.any? { |f| f.can_be_read_by?(user) } end end end
Version data entries
16 entries across 16 versions & 1 rubygems