scinote-web/app/notifications/low_stock_notification.rb

23 lines
439 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class LowStockNotification < BaseNotification
def message
I18n.t(
'notifications.content.item_low_stock_reminder.message_html',
repository_row_name: subject.name
)
end
def subtype
:item_low_stock_reminder
end
def title
I18n.t('notifications.content.item_low_stock_reminder.title_html')
end
def subject
RepositoryRow.find(params[:repository_row_id])
end
end