ontology_version.rb revision ab2be9b1453256821fb11be230149c49963a7b69
b0ad67a7b41855a9148f346eb5b5d2b9276796ddhenning mueller include Rails.application.routes.url_helpers
cbb18f95cb8354f0c3fb44ba5134dadc7ad6b2ecJulian Kornberger belongs_to :ontology, :counter_cache => :versions_count
940c9c3e36eaf2a919ea2f89e7ecde3f6ebc3450Eugen Kuksa # Provers that can be used for proving goals in this ontology.
b0ad67a7b41855a9148f346eb5b5d2b9276796ddhenning mueller# before_validation :set_checksum
b0ad67a7b41855a9148f346eb5b5d2b9276796ddhenning mueller# validate :raw_file_size_maximum
bceeb5195a8524674b37f6abd92ccaba357e536bSascha Graef# validates_presence_of :basepath
631f43db46ad7d375010c3169c81764eb27270a3Julian Kornberger # updated_at of the latest version
543c1be79aecb1d19f3bd50d8581da5c1cd0893bEugen Kuksa "#{ontology.name} (version #{number})"
b0ad67a7b41855a9148f346eb5b5d2b9276796ddhenning mueller # Public URL to this version
b0ad67a7b41855a9148f346eb5b5d2b9276796ddhenning mueller # TODO: This returns a path without the commit id and filename for now,
b0ad67a7b41855a9148f346eb5b5d2b9276796ddhenning mueller # because the FilesController or the routes were not supporting it.
4c1d51e9760c808027ec7f559e80067744c78541Eugen Kuksa #Rails.application.routes.url_helpers.repository_ref_path(repository, commit_oid, ontology.path, params.reverse_merge(host: Ontohub::Application.config.fqdn, port: Ontohub::Application.config.port, only_path: false))
823b204d13c129df1ae3b49ff62ee1da0c8f6b63Eugen Kuksa "#{basepath}#{file_extension}"
36775360692520baa2625045372081b2cbc9959dTim Reddehase ontology.repository.get_file(path, commit_oid)
33d42e7c36aef2d703ed3e35536dca4cd4290470Tim Reddehase "/ref/#{number}#{ontology.locid}"
ecf32c9d659a1f42c730d61eaa93583c095a4fddhenning mueller errors.add :raw_file, 'The maximum file size is 10M.'