thoughtbot/administrate

Documentation suggestion for nested forms - HasOne

オープン

#1,013 opened on 2017/10/25

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)Ruby (1,110 件のフォーク)batch import
bugdocumentationgood first issue

Repository metrics

Stars
 (5,765 個のスター)
PR merge metrics
 (PR metrics pending)

説明

It would be useful to explain that in order to have a has_one association in a form, one has to add

  has_one :thing
  accepts_nested_attributes_for :thing

to the parent model. Saying this because the Field::HasOne already supports nested form and allows the params.

https://github.com/thoughtbot/administrate/blob/3366bd10a4afaf5bc0c63ea0f5ecc12b5d1bae31/lib/administrate/field/has_one.rb#L8

コントリビューターガイド