0
我有以下类做多的插入到表从视图
class TableA < ActiveRecord::Base
has_one :tableb
end
class TableB < < ActiveRecord::Base
belongs_to :tableA
end
我有一个表A/form.html.erb
<%= form_for(@@table) do |f| %>
<%= f.text_field :tableAColumn %>
<%= f.text_field :tableAColumn1 %>
#how can i how this
<%= f.text_field :tableBColumn %>
<%=f.text_field :tableBColumn1 %>
<%= f.submit %>
<%end>
,以至于当我点击保存两个记录可以被保存在表A和表B中
由于