|
|
@ -16,7 +16,6 @@ class Memo < ApplicationRecord
|
|
|
|
has_many :children, foreign_key: :parent_id, class_name: 'Memo'
|
|
|
|
has_many :children, foreign_key: :parent_id, class_name: 'Memo'
|
|
|
|
has_many :attachments, as: :container, dependent: :destroy
|
|
|
|
has_many :attachments, as: :container, dependent: :destroy
|
|
|
|
has_many :tidings, as: :container, dependent: :destroy
|
|
|
|
has_many :tidings, as: :container, dependent: :destroy
|
|
|
|
validate_harmonious_of [:subject, :content]
|
|
|
|
|
|
|
|
validate :validate_sensitive_string
|
|
|
|
validate :validate_sensitive_string
|
|
|
|
|
|
|
|
|
|
|
|
scope :field_for_list, lambda{
|
|
|
|
scope :field_for_list, lambda{
|
|
|
|