Showing
3 changed files
with
2 additions
and
2 deletions
No preview for this file type
| ... | ... | @@ -10,7 +10,7 @@ module Kanjai |
| 10 | 10 | accepts_nested_attributes_for :page_content_markers |
| 11 | 11 | |
| 12 | 12 | has_many :page_content_attributes, dependent: :destroy |
| 13 | - accepts_nested_attributes_for :page_content_attributes | |
| 13 | + accepts_nested_attributes_for :page_content_attributes, reject_if: :all_blank, allow_destroy: true | |
| 14 | 14 | |
| 15 | 15 | def self.edit_template(page, content_type) |
| 16 | 16 | case content_type | ... | ... |