osp_id validate

This commit is contained in:
fanqiang 2014-05-05 08:10:22 +08:00
parent 6ba53f534a
commit dbef2f958a
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ class RelativeMemo < ActiveRecord::Base
# validates_length_of :subject, maximum: 50
#validates_length_of :content, maximum: 3072
validate :cannot_reply_to_locked_topic, :on => :create
validates_uniqueness_of :osp_id, :scope => [:subject, :context]
acts_as_tree :counter_cache => :replies_count, :order => "#{RelativeMemo.table_name}.created_at ASC"
acts_as_attachable