测试projects列表页的筛选

This commit is contained in:
sylor_huang@126.com 2020-05-09 15:38:14 +08:00
parent 8faaf7ac3a
commit da3a89c20c
1 changed files with 3 additions and 3 deletions

View File

@ -7,13 +7,13 @@ class ProjectsController < ApplicationController
def index
scope = Projects::ListQuery.call(params)
Rails.logger.info("#######_____scope__ids_____######{scope.pluck(:id)}")
@total_count = scope.size
Rails.logger.info("#######______total_count______######{@total_count}")
page = params[:page] || 1
limit = params[:limit] || 15
@projects = scope.page(page).per(limit)
projects = scope.page(page).per(limit)
Rails.logger.info("#######_____projects_ids______######{projects.pluck(:id)}")
@projects = projects
end
def create