小程序实训首页排序问题

dev_jupyter
daiao 5 years ago
parent ec4bbf4770
commit 1946469522

@ -0,0 +1,8 @@
class ModifyWechatSupportForShixuns < ActiveRecord::Migration[5.2]
def change
name = ["Python基础", "C语言基础", "C++基础", "Java"]
shixuns = Shixun.includes(:tag_repertoires)
.where(tag_repertoires: {name: name}, shixuns: {status: 2, hide_code: false})
shixuns.update_all(is_wechat_support: true)
end
end
Loading…
Cancel
Save