From c211548a13326945c5795b74ee1ad64e41c29383 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 28 Jun 2019 15:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E4=BD=9C=E8=80=85=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- app/views/shixuns/add_collaborators.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 89a0d524f..73029706f 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -635,7 +635,7 @@ class ShixunsController < ApplicationController end page = params[:page] || 1 limit = params[:limit] || 20 - @total_count = @users.count + @user_count = @users.count @users = @users.page(page).per(limit) end diff --git a/app/views/shixuns/add_collaborators.json.jbuilder b/app/views/shixuns/add_collaborators.json.jbuilder index 79b325fcd..d73a5b9bc 100644 --- a/app/views/shixuns/add_collaborators.json.jbuilder +++ b/app/views/shixuns/add_collaborators.json.jbuilder @@ -1,5 +1,5 @@ #json.partial! "users/users_list", users: @users -json.total_count @total_count +json.user_count @user_count json.users do json.array! @users do |user| json.user_id user.id