0

我有 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

但它只显示两个网格。MachineGridMachineMouseGrid。我MachineKeyBoardGrid也想要。

4

1 回答 1

0

您需要使用以下教程作为参考自己实现它: https ://github.com/netzke/netzke/wiki/Building-a-composite-component

于 2012-10-14T08:45:10.467 回答