Class: Forum
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Forum
- Defined in:
- app/models/forum.rb
Instance Method Summary collapse
- #dom_id ⇒ Object
- #visible_by_default? ⇒ Boolean
-
#visible_to_with_configuration?(reader = nil) ⇒ Boolean
chains the visible_to? method created during the has_groups call.
Instance Method Details
#dom_id ⇒ Object
11 12 13 |
# File 'app/models/forum.rb', line 11 def dom_id "forum_#{self.id}" end |
#visible_by_default? ⇒ Boolean
22 23 24 |
# File 'app/models/forum.rb', line 22 def visible_by_default? !!Radiant.config['forum.public?'] end |
#visible_to_with_configuration?(reader = nil) ⇒ Boolean
chains the visible_to? method created during the has_groups call.
16 17 18 19 |
# File 'app/models/forum.rb', line 16 def visible_to_with_configuration?(reader=nil) Rails.logger.warn "Forum#visible_to_with_configuration?" return true if (reader || visible_by_default?) && visible_to_without_configuration?(reader) end |