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:
parent
c3c33b68dd
commit
397859ba8a
3 changed files with 3 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
class Page < ActiveRecord::Base
|
||||
belongs_to :web
|
||||
has_many :revisions, :order => 'id'
|
||||
has_many :revisions, :order => 'id', :dependent => :destroy
|
||||
has_many :wiki_references, :order => 'referenced_name'
|
||||
has_one :current_revision, :class_name => 'Revision', :order => 'id DESC'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue