Cross Reference: ontology_type.rb
xref
: /
ontohub
/
app
/
models
/
ontology_type.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
class
OntologyType
<
ActiveRecord
::
Base
scope
:
not_empty
,
joins
(:
ontologies
)
.
group
(
'
ontology_types.id
'
)
has_many
:
ontologies
attr_accessible
:
name
, :
description
, :
documentation
validates
:
name
,
:
presence
=>
true
validates
:
description
,
:
presence
=>
true
validates
:
documentation
,
:
format
=>
{ :
with
=>
URI
::
regexp
(
Settings.allowed
_iri_schemes
)
}
def
to_s
name
end
def
name_with_ontology_count
"#{self} (#{
self.ontologies.count
})"
end
end