ontology_version.rb revision ac2169141f0b549fc8917a4b1d778f4ba3cab0bf
# before_validation :set_checksum
# validate :presence_of_raw_file_or_source_url, :on => :create
# validate :raw_file_size_maximum
delegate :repository, to: :ontology
# updated_at of the latest version
end
source_url? ? source_url : 'File upload'
end
end
# public URL to this version
Rails.application.routes.url_helpers.ontology_ontology_version_path(ontology, self, params.reverse_merge(host: Settings.hostname, only_path: false))
end
errors.add :source_url, 'Specify either a source file or URI.'
end
end
errors.add :raw_file, 'The maximum file size is 10M.'
end
end
end
end