From 020b7db712a648ad874c6898143abcd8774c8e17 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 27 Jan 2024 20:24:29 +0100 Subject: [PATCH] Remove ordered_inbox method and related paginator --- app/models/user/inbox_methods.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/models/user/inbox_methods.rb b/app/models/user/inbox_methods.rb index b5efab58..50a81039 100644 --- a/app/models/user/inbox_methods.rb +++ b/app/models/user/inbox_methods.rb @@ -1,18 +1,6 @@ # frozen_string_literal: true module User::InboxMethods - include CursorPaginatable - - define_cursor_paginator :cursored_inbox, :ordered_inbox - - # @return [ActiveRecord::Relation] the user's inbox entries - def ordered_inbox - inbox_entries - .includes(:question, user: :profile) - .order(:created_at) - .reverse_order - end - def unread_inbox_count Rails.cache.fetch(inbox_cache_key, expires_in: 12.hours) do count = InboxEntry.where(new: true, user_id: id).count(:id)