mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
15 lines
538 B
Ruby
15 lines
538 B
Ruby
# frozen_string_literal: true
|
|
|
|
json.totals @totals
|
|
json.notifications(@notifications) do |notification|
|
|
json.extract! notification, :id, :notification_type_id, :notification_type, :created_at, :is_read
|
|
json.attached_object notification.attached_object
|
|
json.message do
|
|
if notification.notification_type.nil?
|
|
json.partial! 'api/notifications/undefined_notification', notification: notification
|
|
else
|
|
json.partial! "/api/notifications/#{notification.notification_type}", notification: notification
|
|
end
|
|
end
|
|
end
|