Class: ForumCategory
- Inherits:
-
Category
- Object
- Category
- ForumCategory
- Defined in:
- app/models/forum_category.rb
Instance Method Summary collapse
-
#any_readable_forums?(user) ⇒ Boolean
Are any of the forums readable by this user? One positive is all need…
Instance Method Details
#any_readable_forums?(user) ⇒ Boolean
Are any of the forums readable by this user? One positive is all need…
7 8 9 10 11 12 13 |
# File 'app/models/forum_category.rb', line 7 def any_readable_forums?(user) if user && user.is_admin? true else forums.any? { |f| f.can_be_read_by?(user) } end end |