Class: CommandTower::Messaging::NotificationPreference

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/command_tower/messaging/notification_preference.rb

Class Method Summary collapse

Methods inherited from ApplicationRecord

attribute_to_type_mapping

Class Method Details

.find_for(recipient_id:, notification_type_key:) ⇒ Object



16
17
18
# File 'app/models/command_tower/messaging/notification_preference.rb', line 16

def self.find_for(recipient_id:, notification_type_key:)
  find_by(user_id: recipient_id, notification_type_key: notification_type_key.to_s)
end