mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 23:25:31 +08:00
24 lines
555 B
Ruby
24 lines
555 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ProjectDueDateNotification < BaseNotification
|
|
def self.subtype
|
|
:projects_due_date_reminder
|
|
end
|
|
|
|
def title
|
|
I18n.t(
|
|
'notifications.content.project_due_date_reminder.message_html',
|
|
project_name: subject.name
|
|
)
|
|
end
|
|
|
|
def subject
|
|
Project.find(params[:project_id])
|
|
end
|
|
|
|
after_deliver do
|
|
# rubocop:disable Rails/SkipsModelValidations
|
|
Project.find(params[:project_id]).update_column(:due_date_notification_sent, true)
|
|
# rubocop:enable Rails/SkipsModelValidations
|
|
end
|
|
end
|