我现在举出属于其他应用模式的铁路模型,现在要提供电解表,以便分别更新相关物体的记录,这令人感到非常困惑。
下面是一类样本,用以分析我想要达到的目标:
class Booking < ActiveRecord::Base`
belongs_to :user
belongs_to :department
belongs_to :invoice, :class_name => "Department"
end
`
之后,还试图提供假装。 我不熟悉黑帮派,似乎很少有涉及该案的文件。
= form_for :booking, :url => booking_path(@booking), :html => { :method => :put } do |form|
%ul
- @booking.errors.full_messages.each do |msg|
%li= msg
= label :booking, :status
= form.text_field :status
- form.fields_for :user do |user_form|
= user_form.label :user, :fullname
= user_form.text_field :fullname
= form.submit "Update this booking"
感谢你们的答复。