Class: Thredded::TopicEmailView

Inherits:
Object
  • Object
show all
Defined in:
app/view_models/thredded/topic_email_view.rb

Instance Method Summary collapse

Constructor Details

#initialize(topic) ⇒ TopicEmailView

Returns a new instance of TopicEmailView.

Parameters:


6
7
8
# File 'app/view_models/thredded/topic_email_view.rb', line 6

def initialize(topic)
  @topic = topic
end

Instance Method Details

#no_replyObject


14
15
16
# File 'app/view_models/thredded/topic_email_view.rb', line 14

def no_reply
  Thredded.email_from
end

#smtp_api_tag(tag) ⇒ Object


10
11
12
# File 'app/view_models/thredded/topic_email_view.rb', line 10

def smtp_api_tag(tag)
  %({"category": ["thredded_#{@topic.private? ? 'private_topic' : @topic.messageboard.name}","#{tag}"]})
end