というテーブルがenrollments
あり、これが現在の基本的な登録設定である場合:
class Enrollment < ActiveRecord::Base
belongs_to :father
belongs_to :mother
belongs_to :child
end
class Father < ActiveRecord::Base
has_many :enrollments
has_many :children
validates :first_name, :presence => true
validates :last_name, :presence => true
end
guardian_1_id
ここで、 aと aguardian_2_id
をenrollments
テーブルに追加します。どうすればそれを設定できますか?