我有3个型号:Machine,Mouse,KeyBoard这些是关联的。
class Machine
has_many: mouses
has_many: keyboards
end
class Mouse
belongs_to: machine
end
class KeyBoard
belongs_to: machine
end
这些协会工作正常。
但是,我想通过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
。
答案 0 :(得分:0)
您需要使用以下教程作为参考自己实现它: https://github.com/netzke/netzke/wiki/Building-a-composite-component