小程序查询

sso
jingquan huang 5 years ago
parent 6f5b74f576
commit b4a22f0dcc

@ -41,6 +41,7 @@ class Subject < ApplicationRecord
scope :published, lambda{where(status: 1)}
scope :unhidden, lambda{where(hidden: 0)}
scope :publiced, lambda{ where(public: 2) }
scope :show_moblied, lambda{ where(show_mobile: true) }
after_create :send_tiding
def send_tiding

@ -8,7 +8,7 @@ class Weapps::SubjectQuery < ApplicationQuery
end
def call
subjects = @current_laboratory.subjects.unhidden.publiced
subjects = @current_laboratory.subjects.unhidden.publiced.show_moblied
# 课程体系的过滤
if params[:sub_discipline_id].present?

Loading…
Cancel
Save