scinote-web/app/models/result_text.rb
2016-11-11 11:42:16 +01:00

9 lines
284 B
Ruby

class ResultText < ActiveRecord::Base
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
end