Class: Forum

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/forum.rb

Instance Method Summary collapse

Instance Method Details

#dom_idObject



11
12
13
# File 'app/models/forum.rb', line 11

def dom_id
  "forum_#{self.id}"
end

#visible_by_default?Boolean

Returns:

  • (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.

Returns:

  • (Boolean)


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