Sha256: 8e7234ca84eb76421f58eb262c714708acbc54d2278af2fc4778c37f6a32bcb3

Contents?: true

Size: 745 Bytes

Versions: 16

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

module Thredded
  class NotificationsForFollowedTopics < ActiveRecord::Base
    belongs_to :user,
               class_name: Thredded.user_class_name,
               inverse_of: :thredded_notifications_for_followed_topics
    belongs_to :messageboard # or is global
    belongs_to :user_preference,
               primary_key: :user_id,
               foreign_key: :user_id,
               inverse_of: :notifications_for_followed_topics

    validates :user_id, presence: true

    include Thredded::NotifierPreference

    def self.default(_notifier)
      # could be moved to  `notifier.defaults(:notifications_for_followed_topics)`
      Thredded::BaseNotifier::NotificationsDefault.new(true)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
thredded-0.14.3 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.14.2 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.14.1 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.14.0 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.8 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.7 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.6 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.5 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.4 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.3 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.2 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.1 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.13.0 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.12.4 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.12.3 app/models/thredded/notifications_for_followed_topics.rb
thredded-0.12.2 app/models/thredded/notifications_for_followed_topics.rb