scinote-web/app/notifications/general_notification.rb

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