0

マシン、マウス、キーボードの 3 つのモデルがあります。これらは関連付けられています。

class Machine
  has_many: mouses
  has_many: keyboards
end

class Mouse
  belongs_to: machine
end

class KeyBoard
  belongs_to: machine
end

これらの関連付けは正常に機能しています。

しかし、netzke で 3 つのグリッドを表示したい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

しかし、それは2つのグリッドのみを示しています。MachineGridMachineMouseGrid。私MachineKeyBoardGridも欲しい。

4

1 に答える 1

0

次のチュートリアルを参考にして、自分で実装する必要があります: https://github.com/netzke/netzke/wiki/Building-a-composite-component

于 2012-10-14T08:45:10.467 に答える