lib/para/page/model.rb in para-0.6.9 vs lib/para/page/model.rb in para-0.7.0

- old
+ new

@@ -2,10 +2,12 @@ module Page module Model extend ActiveSupport::Concern included do - has_many :sections, -> { ordered }, class_name: '::Para::Page::Section', as: :page + has_many :sections, -> { ordered }, class_name: '::Para::Page::Section', + as: :page, + dependent: :destroy accepts_nested_attributes_for :sections, allow_destroy: true end end end end