Cross Reference: mapping_version.rb
xref
: /
ontohub
/
app
/
models
/
mapping_version.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
class
MappingVersion
<
ActiveRecord
::
Base
belongs_to
:
mapping
belongs_to
:
source
,
class_name
:
'OntologyVersion'
belongs_to
:
target
,
class_name
:
'OntologyVersion'
attr_accessible
:
mapping
,
:
required_cons_status
,
:
proven_cons_status
,
:
proof_status
,
:
source
,
:
target
,
:
source_id
,
:
target_id
,
:
version_number
before_create
:
increase_number
private
def
increase_number
self.version
_number
=
if
mapping.versions.current
mapping.versions.current.version
_number
+
1
else
1
end
end
end