Added version control for wiki pages.

This commit is contained in:
Benjamin Meichsner 2009-05-15 17:32:45 +02:00
parent 7ba6bc3680
commit 053c665270
36 changed files with 1647 additions and 15 deletions

View file

@ -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

View file

@ -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