Cross Reference: ontology_version.rb
xref
: /
ontohub
/
app
/
models
/
ontology_version.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ontology_version.rb revision bafdf16599e50320117ec8630e771b47ebab2219
class
OntologyVersion
<
ActiveRecord
::
Base
include
OntologyVersion
::
Parsing
belongs_to
:
user
belongs_to
:
ontology
, :
counter_cache
=> :
versions_count
mount_uploader
:
raw_file
,
OntologyUploader
mount_uploader
:
xml_file
,
OntologyUploader
attr_accessible
:
raw_file
, :
remote_raw_file_url
validates
:
raw_file
,
file_size
:
{
maximum
:
10.megabytes.to
_i
}
scope
:
latest
,
order
(
'id DESC'
)
before_create
:
set_source_uri
def
set_source_uri
self.source
_uri
=
self.remote
_raw_file_url
end
end