From a08bbe278462c0ab77f22856c7090002e0a69fc2 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 18 Oct 2019 14:43:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/shixun.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 7e267bd90..e0feb80ce 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -48,7 +48,7 @@ class Shixun < ApplicationRecord has_many :tidings, as: :container, dependent: :destroy # 实训审核记录 - has_many :shixun_reviews, -> {order("challenges.created_at desc")}, :dependent => :destroy + has_many :shixun_reviews, -> {order("shixun_reviews.created_at desc")}, :dependent => :destroy scope :search_by_name, ->(keyword) { where("name like ? or description like ? ", "%#{keyword}%", "%#{keyword}%") }