diff --git a/app/models/relative_memo.rb b/app/models/relative_memo.rb index eeef0eb9..6a470663 100644 --- a/app/models/relative_memo.rb +++ b/app/models/relative_memo.rb @@ -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