1
私はこれまでのところ、私が得たものカスタムはreject_if
accepts_nested_attributes_for :categories, :reject_if => proc { |hash| hash['title'].blank? }
以下本のカスタムバージョンを作成
def categories_attributes=(categories_attributes)
categories_attributes.values.each do |category_attribute|
category = Category.find_or_create_by(category_attribute)
categories << category
end
end
あるしようとしていますが、私はreject_ifパーツを追加しようとしているとaccepts_nested_attributes_forのバージョン属性私はそれを理解しているようです。その部分を下のカスタム属性にどのように複製できますか?
ありがとうございます!
として行いますがaccepts_nested_attributes_for thatsのは –
私はイムは、カスタムバージョンにそれを複製しようと、作品を投稿accepts_nested_attributes_forのバージョンレールに含まれていない属性 –