mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
9 lines
284 B
Ruby
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
|