我有3个型号:机器,鼠标,KeyBoard,这些都是相关的。
class Machine
has_many: mouses
has_many: keyboards
end
class Mouse
belongs_to: machine
end
class KeyBoard
belongs_to: machine
end这些关联运行得很好。
但是,我想通过OneToManyExplorer在netzke中显示这三个网格
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。
发布于 2012-10-14 16:45:10
您需要使用以下教程作为参考自行实现它:https://github.com/netzke/netzke/wiki/Building-a-composite-component
https://stackoverflow.com/questions/12741875
复制相似问题