fix: Update article count in portal admin dashboard (#5647)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Tejaswini Chile
2022-10-22 02:13:15 +05:30
committed by GitHub
parent 95cc55d043
commit 782165478b
29 changed files with 157 additions and 94 deletions

View File

@@ -83,11 +83,7 @@ class Article < ApplicationRecord
).search_by_category_locale(params[:locale]).search_by_author(params[:author_id]).search_by_status(params[:status])
records = records.text_search(params[:query]) if params[:query].present?
records.page(current_page(params))
end
def self.current_page(params)
params[:page] || 1
records
end
def associate_root_article(associated_article_id)