我有 3 个模型:机器、鼠标、键盘,它们是关联的。
class Machine
has_many: mouses
has_many: keyboards
end
class Mouse
belongs_to: machine
end
class KeyBoard
belongs_to: machine
end
这些协会运作良好。
但是,我想通过 netzke 显示三个网格OneToManyExplorer
class MachineExplorer < Netzke::Communitypack::OneToManyExplorer
title "Machines"
title "Machines"
container_config class_name: "MachineGrid",
region: :north,
height: 200,
width: 150
collection_config class_name: "MachineKeyBoardGrid",
region: :east,
height: 200,
width: 100,
split: true
collection_config class_name: "MachineMouseGrid",
region: :center,
height: 200,
width: 150
end
但它只显示两个网格。MachineGrid
和MachineMouseGrid
。我MachineKeyBoardGrid
也想要。