From 53d5d2af3c6b6fb535770090f65b1f9aaa958a7c Mon Sep 17 00:00:00 2001 From: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:56:37 +0530 Subject: [PATCH] chore: Remove pagination from macros listing api (#6419) Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> --- app/models/macro.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/macro.rb b/app/models/macro.rb index 386184419..00beccd01 100644 --- a/app/models/macro.rb +++ b/app/models/macro.rb @@ -38,10 +38,10 @@ class Macro < ApplicationRecord self.visibility = :personal if user.agent? end - def self.with_visibility(user, params) + def self.with_visibility(user, _params) records = Current.account.macros.global records = records.or(personal.where(created_by_id: user.id)) - records.order(:id).page(current_page(params)) + records.order(:id) end def self.current_page(params)