Sha256: 90e083f01f9b3004a6b06d138e3c082dedbc1af6b7cfc3ae27b88d8548309166

Contents?: true

Size: 456 Bytes

Versions: 12

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true
module Thredded
  class TopicEmailView
    # @param [Thredded::TopicCommon] topic
    def initialize(topic)
      @topic = topic
    end

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

    def subject
      "#{Thredded.email_outgoing_prefix} #{@topic.title}"
    end

    def no_reply
      Thredded.email_from
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
thredded-0.12.1 app/view_models/thredded/topic_email_view.rb
thredded-0.12.0 app/view_models/thredded/topic_email_view.rb
thredded-0.11.1 app/view_models/thredded/topic_email_view.rb
thredded-0.11.0 app/view_models/thredded/topic_email_view.rb
thredded-0.10.1 app/view_models/thredded/topic_email_view.rb
thredded-0.10.0 app/view_models/thredded/topic_email_view.rb
thredded-0.9.4 app/view_models/thredded/topic_email_view.rb
thredded-0.9.3 app/view_models/thredded/topic_email_view.rb
thredded-0.9.2 app/view_models/thredded/topic_email_view.rb
thredded-0.9.1 app/view_models/thredded/topic_email_view.rb
thredded-0.8.4 app/view_models/thredded/topic_email_view.rb
thredded-0.8.2 app/view_models/thredded/topic_email_view.rb