This commit is contained in:
r888888888
2013-05-07 17:58:27 -07:00
parent 5a1a3baa1c
commit 49de333b74
3 changed files with 19 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ class WikiPage < ActiveRecord::Base
belongs_to :creator, :class_name => "User"
belongs_to :updater, :class_name => "User"
validates_uniqueness_of :title, :case_sensitive => false
validates_presence_of :title
validates_presence_of :title, :body
validate :validate_locker_is_janitor
attr_accessible :title, :body, :is_locked
has_one :tag, :foreign_key => "name", :primary_key => "title"