Introduce 'revisions' association on Web
This commit is contained in:
parent
ed8e9cfbd8
commit
c0cab0d0b7
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue