我有3個模型:機器,鼠標,KeyBoard這些是關聯的。 class Machine
has_many: mouses
has_many: keyboards
end
class Mouse
belongs_to: machine
end
class KeyBoard
belongs_to: machine
end
這些關聯工作正常。 但是
這是要求: 在邊界佈局用戶界面中,用戶(工作人員)網格在西部,而在中心的手風琴將顯示在每個選定的用戶的幾個集合(比如獎勵等)當一名工作人員被選中時。 的代碼: class StaffsAndAwards < Netzke::Base
# Remember regions collapse state and size
include Netzke::Basepack::Item
我是新來的Ruby和Rails,並要求有關錯誤而產生簡單的控制器 http://writelesscode.com/blog/2012/10/20/extjs-rails-crud-application-in-7-minutes/ $ rails g controller welcome index
/Library/Ruby/Gems/1.8/gems/netzke-core-0.8.2
域模型:type1,type2,type3和plant。 $ rails g model type1 name:string
$ rails g model type2 name:string
$ rails g model type3 type1:references type2:references name:string
$ rails g model plant type1:refe