mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 03:35:25 +08:00
21 lines
361 B
Ruby
21 lines
361 B
Ruby
# frozen_string_literal: true
|
|
|
|
class GeneralNotification < BaseNotification
|
|
def message
|
|
params[:message]
|
|
end
|
|
|
|
def title
|
|
params[:title]
|
|
end
|
|
|
|
def subtype
|
|
params[:type]
|
|
end
|
|
|
|
def subject
|
|
subject_class.find(params[:subject_id])
|
|
rescue NameError, ActiveRecord::RecordNotFound
|
|
NonExistantRecord.new(params[:subject_name])
|
|
end
|
|
end
|