cartodb-4.42/app/controllers/helpers/organization_notifications_helper.rb
2024-04-06 05:25:13 +00:00

8 lines
320 B
Ruby

module OrganizationNotificationsHelper
def load_organization_notifications
carto_user = Carto::User.where(id: current_user.id).first if current_user
@organization_notifications = carto_user ? carto_user.received_notifications.unread.map { |n| Carto::Api::ReceivedNotificationPresenter.new(n) } : {}
end
end