Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
410 B

module NotificationsHelper
def notification_count
if current_user.present?
current_user.active_unread_notifications.count
else
Notification.active_unauthenticated_notifications.count
end
end
def notification
if current_user.present?
current_user.newest_active_unread_notification
else
Notification.newest_active_unauthenticated_notification
end
end
end