ontology_version.rb revision 6c8d349bce5a8aa4c5af757a84d9432153024e8f
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi belongs_to :ontology, :counter_cache => :versions_count
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi# before_validation :set_checksum
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi# validate :raw_file_size_maximum
cd24dc2196f7480d4793ca5d5f9f8d70741bc103Aki Tuomi :with => URI::regexp(Settings.allowed_iri_schemes), :if => :source_url?
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi # updated_at of the latest version
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi # Public URL to this version
7c9a9ac8cd5652f0e12a24b07c8559a7be0f5554Timo Sirainen # TODO: This returns a path without the commit id and filename for now,
de1c645a79d42c37dffb7f52e9c643b6251fdcd0Aki Tuomi # because the FilesController or the routes were not supporting it.
7e1a69e513739a7c12e3c5ec53dff1eb01b90524Aki Tuomi #Rails.application.routes.url_helpers.repository_ref_path(repository, commit_oid, ontology.path, params.reverse_merge(host: Settings.hostname, only_path: false))
f089a10e4816e772992346c9837ec10db3894c65Timo Sirainen "#{basepath}#{file_extension}"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi errors.add :raw_file, 'The maximum file size is 10M.'