我正在使用 :reject_if 拒绝我的字段以保存在 DB 中。这是我的代码
accepts_nested_attributes_for :profiles,
:reject_if => proc { |a| a[:name] == "Name"},
:allow_destroy => true
我正在使用嵌套形式。
我正在使用 :reject_if 拒绝我的字段以保存在 DB 中。这是我的代码
accepts_nested_attributes_for :profiles,
:reject_if => proc { |a| a[:name] == "Name"},
:allow_destroy => true
我正在使用嵌套形式。