Cross Reference: ontologies.rb
xref
: /
ontohub
/
app
/
models
/
repository
/
ontologies.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ontologies.rb revision 21bd039d8d5c1a95d49c9bf5da28b8f8ee0e5a53
module
Repository
::
Ontologies
extend
ActiveSupport
::
Concern
def
primary_ontology
(
path
)
path
||=
''
onto
=
ontologies.where
(
basepath
:
File.basepath
(
path
)
)
.
first
while
!
onto.nil
? && !
onto.parent.nil
?
onto
=
onto.parent
end
onto
end
end