ontology_version.rb revision 555b7fd96768daf9592e7ddbd4217d784b08e451
cbb18f95cb8354f0c3fb44ba5134dadc7ad6b2ecJulian Kornberger belongs_to :ontology, :counter_cache => :versions_count
acb3db0ee20cd276e305da358a03b30666976db0Daniel Couto Vale validate :presence_of_raw_file_or_source_url, :on => :create
555b7fd96768daf9592e7ddbd4217d784b08e451henning mueller# validate :raw_file_size_maximum
555b7fd96768daf9592e7ddbd4217d784b08e451henning mueller :with => URI::regexp(Settings.allowed_iri_schemes), :if => :source_url?
b9f99a06294e593ce8fb34b015e83003229db058Julian Kornberger scope :state, ->(state) { where :state => state }
43a0f914166a28a9d7f75ab10673dce129cb38a9Julian Kornberger Rails.application.routes.url_helpers.ontology_ontology_version_path(ontology, self, params.reverse_merge(host: Settings.hostname, only_path: false))
a14e1ccbd2588441fb5a59e0c82f895b5c42c298Julian Kornberger errors.add :source_url, 'Specify either a source file or URI.'
ecf32c9d659a1f42c730d61eaa93583c095a4fddhenning mueller errors.add :raw_file, 'The maximum file size is 10M.'