chromesetting
daiao 5 years ago
parent e69b4b7a37
commit 617e6f2b62

@ -465,7 +465,7 @@ class ApplicationController < ActionController::Base
# 实训主类别列表,自带描述 # 实训主类别列表,自带描述
def shixun_main_type def shixun_main_type
list = [] list = []
mirrors = MirrorRepository.select([:id, :type_name, :description]).published_main_mirror mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_main_mirror
mirrors.try(:each) do |mirror| mirrors.try(:each) do |mirror|
list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description), mirror_name: mirror.name} list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description), mirror_name: mirror.name}
end end
@ -475,7 +475,7 @@ class ApplicationController < ActionController::Base
# 小类别列表 # 小类别列表
def shixun_small_type def shixun_small_type
list = [] list = []
mirrors = MirrorRepository.select([:id, :type_name, :description]).published_small_mirror mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_small_mirror
mirrors.try(:each) do |mirror| mirrors.try(:each) do |mirror|
list << {id: mirror.id, type_name: mirror.type_name, description: mirror.description, mirror_name: mirror.name} list << {id: mirror.id, type_name: mirror.type_name, description: mirror.description, mirror_name: mirror.name}
end end

Loading…
Cancel
Save