Appease the dog overlords

This commit is contained in:
Karina Kwiatek 2023-03-10 21:08:28 +01:00
parent c9c458252b
commit 80d8bebe57
3 changed files with 20 additions and 21 deletions

View File

@ -26,7 +26,7 @@ class NotificationsController < ApplicationController
end
def read
current_user.notifications.where(new: true).update_all(new: false)
current_user.notifications.where(new: true).update_all(new: false) # rubocop:disable Rails/SkipsModelValidations
respond_to do |format|
format.turbo_stream do

View File

@ -31,7 +31,7 @@
%span.badge= notification_count
.dropdown-menu.dropdown-menu-end.notification-dropdown
%turbo-frame#notifications-dropdown-list
= render 'navigation/dropdown/notifications', notifications:, notification_count: nil
= render "navigation/dropdown/notifications", notifications:, notification_count: nil
%li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t('.ask_question') }
%a.nav-link{ href: "#", name: "toggle-all-ask", data: { bs_target: "#modal-ask-followers", bs_toggle: :modal, hotkey: "n" } }
%i.fa.fa-pencil-square-o

View File

@ -1,4 +1,3 @@
.dropdown-menu.dropdown-menu-end.notification-dropdown{ id: "rs-#{size}-nav-notifications" }
- if notifications.count.zero?
%a.dropdown-item.text-center{ href: notifications_path('all') }
%i.fa.fa-fw.fa-chevron-right
@ -15,5 +14,5 @@
= t(".mark_as_read")
- notifications.each do |notification|
.dropdown-item
= render "notifications/type/#{notification.target.class.name.downcase.split('::').last}", notification: notification
= render "notifications/type/#{notification.target.class.name.downcase.split('::').last}", notification: