0
的has_many關係,所以,如果我有兩個模型是這樣的:創建一個從形式
#parent.rb
class Parent < ApplicationRecord
has_many :children
end
#children.rb
class Child < ApplicationRecord
belongs_to :parent
end
你會如何創建一個表單,允許您在創建父窗體創建多個孩子?