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