Class: Thredded::PrivateTopicDecorator

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/decorators/thredded/private_topic_decorator.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(private_topic) ⇒ PrivateTopicDecorator

Returns a new instance of PrivateTopicDecorator.



5
6
7
# File 'app/decorators/thredded/private_topic_decorator.rb', line 5

def initialize(private_topic)
  super Thredded::BaseTopicDecorator.new(private_topic)
end

Class Method Details

.model_name ⇒ Object



9
10
11
# File 'app/decorators/thredded/private_topic_decorator.rb', line 9

def self.model_name
  ActiveModel::Name.new(self, nil, 'PrivateTopic')
end

Instance Method Details

#css_class ⇒ Object



17
18
19
20
21
# File 'app/decorators/thredded/private_topic_decorator.rb', line 17

def css_class
  classes = []
  classes << 'thredded--private-topic'
  classes.join(' ')
end

#to_model ⇒ Object



13
14
15
# File 'app/decorators/thredded/private_topic_decorator.rb', line 13

def to_model
  __getobj__
end