2021-01-28 00:29:24 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ShelvedNotification < ActiveRecord::Base
|
2024-08-27 10:56:00 +08:00
|
|
|
self.ignored_columns = [
|
|
|
|
:old_notification_id, # TODO: Remove when column is dropped. At this point, the migration to drop the column has not been writted.
|
|
|
|
]
|
|
|
|
|
2021-01-28 00:29:24 +08:00
|
|
|
belongs_to :notification
|
|
|
|
|
|
|
|
def process
|
|
|
|
NotificationEmailer.process_notification(notification, no_delay: true)
|
|
|
|
end
|
|
|
|
end
|
2021-07-06 06:14:15 +08:00
|
|
|
|
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: shelved_notifications
|
|
|
|
#
|
2024-08-27 11:15:03 +08:00
|
|
|
# id :bigint not null, primary key
|
|
|
|
# notification_id :bigint not null
|
2021-07-06 06:14:15 +08:00
|
|
|
#
|
|
|
|
# Indexes
|
|
|
|
#
|
|
|
|
# index_shelved_notifications_on_notification_id (notification_id)
|
|
|
|
#
|