diff --git a/app/controllers/notifications/notifications_controller.rb b/app/controllers/notifications/notifications_controller.rb index 550e616..a067b38 100644 --- a/app/controllers/notifications/notifications_controller.rb +++ b/app/controllers/notifications/notifications_controller.rb @@ -2,11 +2,10 @@ module Notifications class NotificationsController < Notifications::ApplicationController def index @notifications = notifications.includes(:actor).order("id desc").page(params[:page]) + @notification_groups = @notifications.group_by { |note| note.created_at.to_date } - unread_ids = @notifications.reject(&:read?).select(&:id) + unread_ids = @notifications.unread.ids Notification.read!(current_user, unread_ids) - - @notification_groups = @notifications.group_by { |note| note.created_at.to_date } end def read diff --git a/lib/notifications/base.rb b/lib/notifications/base.rb deleted file mode 100644 index f155838..0000000 --- a/lib/notifications/base.rb +++ /dev/null @@ -1,12 +0,0 @@ -module Notifications - class Base - extend ActiveSupport::Concern - - included do - end - - class_methods do - def - end - end -end