mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-07 15:33:50 +08:00
9 lines
293 B
Ruby
9 lines
293 B
Ruby
class RepositoryTextValue < ActiveRecord::Base
|
|
has_one :repository_cell, as: :value
|
|
accepts_nested_attributes_for :repository_cell
|
|
|
|
validates :repository_cell, presence: true
|
|
validates :value,
|
|
presence: true,
|
|
length: { maximum: Constants::TEXT_MAX_LENGTH }
|
|
end
|