thoughtbot/administrate

Documentation suggestion for nested forms - HasOne

开放

#1,013 创建于 2017年10月25日

 (2 条评论) (0 个反应) (0 位负责人)Ruby (1,110 个派生)batch import
bugdocumentationgood first issue

仓库指标

星标
 (5,765 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南