Class: Thredded::TopicEmailView
- Inherits:
-
Object
- Object
- Thredded::TopicEmailView
- Defined in:
- app/view_models/thredded/topic_email_view.rb
Instance Method Summary collapse
-
#initialize(topic) ⇒ TopicEmailView
constructor
A new instance of TopicEmailView.
- #no_reply ⇒ Object
- #reply_to ⇒ Object
- #smtp_api_tag(tag) ⇒ Object
- #subject ⇒ Object
Constructor Details
#initialize(topic) ⇒ TopicEmailView
Returns a new instance of TopicEmailView.
5 6 7 |
# File 'app/view_models/thredded/topic_email_view.rb', line 5 def initialize(topic) @topic = topic end |
Instance Method Details
#no_reply ⇒ Object
21 22 23 |
# File 'app/view_models/thredded/topic_email_view.rb', line 21 def no_reply Thredded.email_from end |
#reply_to ⇒ Object
17 18 19 |
# File 'app/view_models/thredded/topic_email_view.rb', line 17 def reply_to Thredded.email_reply_to.call(@topic) end |
#smtp_api_tag(tag) ⇒ Object
9 10 11 |
# File 'app/view_models/thredded/topic_email_view.rb', line 9 def smtp_api_tag(tag) %({"category": ["thredded_#{@topic.private? ? 'private_topic' : @topic..name}","#{tag}"]}) end |
#subject ⇒ Object
13 14 15 |
# File 'app/view_models/thredded/topic_email_view.rb', line 13 def subject "#{Thredded.email_outgoing_prefix} #{@topic.title}" end |