Sha256: 1d6a6f8091d6841acce7b6bdbead30b15087c59567ab21c01f8b6c4b455aa5c1
Contents?: true
Size: 471 Bytes
Versions: 40
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true module Thredded module NotifierPreference extend ActiveSupport::Concern included do delegate :human_name, to: :notifier, prefix: true def self.detect_or_default(prefs, notifier) (prefs && prefs.find { |pref| pref.notifier_key == notifier.key }) || default(notifier) end end def notifier @notifier ||= Thredded.notifiers.find { |notifier| notifier.key == notifier_key } end end end
Version data entries
40 entries across 40 versions & 2 rubygems