mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
23 lines
438 B
Ruby
23 lines
438 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DeliveryNotification < BaseNotification
|
|
def self.subtype
|
|
:delivery
|
|
end
|
|
|
|
def message
|
|
params[:message]
|
|
end
|
|
|
|
def title
|
|
params[:title]
|
|
end
|
|
|
|
def subject
|
|
return unless params[:subject_id] && params[:subject_class]
|
|
|
|
params[:subject_class].constantize.find(params[:subject_id])
|
|
rescue ActiveRecord::RecordNotFound
|
|
NonExistantRecord.new(params[:subject_name])
|
|
end
|
|
end
|