class ResultText < ApplicationRecord include TinyMceImages auto_strip_attributes :text, nullify: false validates :text, presence: true, length: { maximum: Constants::RICH_TEXT_MAX_LENGTH } validates :result, presence: true belongs_to :result, inverse_of: :result_text, touch: true, optional: true end