diff --git a/app/models/web.rb b/app/models/web.rb index 2f918ceb..c0a58c58 100644 --- a/app/models/web.rb +++ b/app/models/web.rb @@ -1,7 +1,13 @@ class Web < ActiveRecord::Base + ## Associations + has_many :pages, :dependent => :destroy has_many :wiki_files, :dependent => :destroy + has_many :revisions, :through => :pages + + ## Methods + def wiki Wiki.new end