Clean Deletions

Deleting a page removes all revisions of that page.
Deleting a Web removes all pages (and all revisions thereof)
  and all wiki_files belonging to that Web.
This commit is contained in:
Jacques Distler 2008-12-28 21:36:37 -06:00
parent c3c33b68dd
commit 397859ba8a
3 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,6 @@
class Web < ActiveRecord::Base
has_many :pages
has_many :wiki_files
has_many :pages, :dependent => :destroy
has_many :wiki_files, :dependent => :destroy
def wiki
Wiki.new