测试搜索的结果问题

This commit is contained in:
sylor_huang@126.com 2020-04-22 10:54:04 +08:00
parent 4afecb40db
commit f8fd272eac
2 changed files with 4 additions and 1 deletions

View File

@ -11,8 +11,10 @@ class ProjectsController < ApplicationController
scope = Projects::ListQuery.call(params.merge(is_admin: is_admin, user_id: current_user.try(:id)))
@total_count = scope.size
Rails.logger.info("########_________scope_ids_________________#########{scope.pluck(:id)}")
@projects = paginate(scope)
# @projects = scope.page(params[:page]).limit(params[:limit] || 15)
end
def create

View File

@ -1,6 +1,7 @@
json.total_count @total_count
json.projects do
json.array! @projects do |project|
json.array! @projects.each do |project|
Rails.logger.info("#######_______project.id________########{project.id}")
json.partial! 'project', project: project
json.author do
json.name project&.owner&.login