ontology_version.rb revision ffddc54fc6bb11130abd3281dcd95159c7f3ce7f
cbb18f95cb8354f0c3fb44ba5134dadc7ad6b2ecJulian Kornberger belongs_to :ontology, :counter_cache => :versions_count
ffa89afcecb07f2fe8664d097cc6839d1d22d7dbhenning mueller validate :raw_file_xor_source_uri, :on => :create
b0779279f704973922208157bb41a4c1569ce356henning mueller# validate :raw_file_size_maximum
ecf32c9d659a1f42c730d61eaa93583c095a4fddhenning mueller :with => URI::regexp(ALLOWED_URI_SCHEMAS), :if => :source_uri?
b9f99a06294e593ce8fb34b015e83003229db058Julian Kornberger scope :state, ->(state) { where :state => state }
87107747f8a51d0f07c2e2a415fcf9c494783f0fhenning mueller errors.add :source_uri, 'Specify either a source file or URI.'
ecf32c9d659a1f42c730d61eaa93583c095a4fddhenning mueller errors.add :raw_file, 'The maximum file size is 10M.'