Added version control for wiki pages.
This commit is contained in:
parent
7ba6bc3680
commit
053c665270
36 changed files with 1647 additions and 15 deletions
|
|
@ -1,5 +1,10 @@
|
|||
class Page < ActiveRecord::Base
|
||||
|
||||
belongs_to :user, :foreign_key => 'updated_by'
|
||||
|
||||
acts_as_versioned
|
||||
self.non_versioned_columns += ['permalink', 'created_at']
|
||||
|
||||
validates_presence_of :title, :body
|
||||
validates_uniqueness_of :permalink
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class User < ActiveRecord::Base
|
|||
has_many :assignments, :dependent => :destroy
|
||||
has_many :tasks, :through => :assignments
|
||||
has_many :send_messages, :class_name => "Message", :foreign_key => "sender_id"
|
||||
has_many :pages, :foreign_key => 'updated_by'
|
||||
|
||||
attr_accessor :password, :setting_attributes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue