代码报错

problem_set
daiao 6 years ago
parent 597cd0c3a9
commit a08bbe2784

@ -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}%") }

Loading…
Cancel
Save