我正在使用:reject_if拒绝我的字段以保存在DB中。这是我的代码
accepts_nested_attributes_for :profiles,
:reject_if => proc { |a| a[:name] == "Name"},
:allow_destroy => true
我正在使用嵌套表单。
答案 0 :(得分:0)
你有attr_accessible吗?
如果是这样,你需要包括
attr_accessible :profiles_attributes