qiita.rb
book.attributes.merge!(_destroy: true)
ただし、親モデルでaccepts_nested_attributes_for: books
となっていること
More than 5 years have passed since last update.
book.attributes.merge!(_destroy: true)
ただし、親モデルでaccepts_nested_attributes_for: books
となっていること
Register as a new user and use Qiita more conveniently