From 9e60dea083078790b4ae63703ecbe767cfa0520d Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Tue, 9 Jul 2019 12:27:51 +0800 Subject: [PATCH] fixbug --- app/controllers/shixuns_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 7c941dec..9c744e0f 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -297,9 +297,9 @@ class ShixunsController < ApplicationController # 首页实训导航点击时,type参数 def index - a = Shixun.order("myshixuns_count desc").limit(24).pluck(:git_url) + a = Shixun.joins(:shixun_tag_repertoires).where("shixun_tag_repertoires.tag_repertoire_id = 152").order("myshixuns_count desc").limit(24).pluck(:git_url) logger.info("###########________git_url_____________##########{a}") - s = Shixun.order("myshixuns_count desc").limit(24).pluck(:id) + s = Shixun.joins(:shixun_tag_repertoires).where("shixun_tag_repertoires.tag_repertoire_id = 152").order("myshixuns_count desc").limit(24).pluck(:id) logger.info("###########________shixun_ids_____________##########{s}") @type = params[:type]