Cross Reference: ontology_search_helper.rb
xref
: /
ontohub
/
app
/
helpers
/
ontology_search_helper.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
module
OntologySearchHelper
def
render_filter
(
klass
,
include_blank
=
''
,
selected_key
:
nil
)
name
=
klass.name.underscore.to
_sym
render
'
shared
/
ontology_search_filter
'
,
name
:
name
,
filter
:
filter_list_for
(
klass
)
,
include_blank
:
include_blank
,
selected
:
params
[
selected_key
]
end
def
filter_list_for
(
klass
)
if
@
repository_id
klass.not_empty.where
(
ontologies
: {
repository_id
: @
repository_id
})
else
klass.not
_empty
end
end
end