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