Permalink
Browse files

delete page parts when page is deleted

  • Loading branch information...
1 parent b19749a commit 3d6b3f13a49a5863fe4ff7bcf324d507ed2f7123 @primerano primerano committed Sep 15, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 vendor/refinerycms/pages/app/models/page.rb
@@ -10,7 +10,8 @@ class Page < ActiveRecord::Base
has_many :parts,
:class_name => "PagePart",
:order => "position ASC",
- :inverse_of => :page
+ :inverse_of => :page,
+ :dependent => :destroy
accepts_nested_attributes_for :parts,
:allow_destroy => true

0 comments on commit 3d6b3f1

Please sign in to comment.