Cross Reference: status_ontology_viewhelper.rb
xref
: /
ontohub
/
app
/
viewhelpers
/
status_ontology_viewhelper.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
status_ontology_viewhelper.rb revision 2883814db03fc155dce10fa355421c6a60bba4fd
class
StatusOntologyViewhelper
include
ActionView
::
Helpers
::
DateHelper
STATE
=
'processing'
def
processing_ontologies_count
processing_ontology_query.size
end
def
processing_ontology_data
@
data
||=
processing_ontology_query.map
do
|
ov
|
OpenStruct.new
(
{
ontology
:
ov.ontology
,
ontology_version
:
ov
,
running_for
:
time_ago_in_words
(
ov.state
_updated_at
)
,
}
)
end
end
def
any_processing_ontologies
?
processing_ontology_query.any
?
end
private
def
processing_ontology_query
OntologyVersion.where
(
state
:
STATE
)
.
order
(
'state_updated_at ASC'
)
end
end