ontologies_controller.rb revision 5ec1c6ff5da427d945d7fb708567ce3526c4c741
#
# Controller for ontologies
#
if in_repository?
else
end
end
end
end
end
end
if !params[:repository_id]
# redirect for legacy routing
return
end
respond_to do |format|
format.html do
if !resource.distributed?
else
end
end
format.json do
end
end
end
else
end
end
# retry a specific ontology
scope = scope.where(id: id)
end
redirect_to (id ? [parent, scope.first!, :ontology_versions] : [parent, :ontologies])
end
respond_to do |format|
format.json do
end
end
end
end
end
end
end
end
@a ||= []
vertex.children.each { |child| build_categories_tree(child) unless child.children.empty?; @a << child }
@a
end
def user_selected_categories
params[:category_ids].keys unless params[:category_ids].nil?
end
helper_method :repository
def repository
parent
end
private
def send_download
render text: resource.repository.get_file(resource.path).content,
content_type: Mime::Type.lookup('application/force-download')
end
end