7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/controllers/tasks/exports/coldp_controller.rb', line 7
def download
redirect_to export_coldp_task_path, notice: 'Nothing selected' and return unless !params[:otu_id].blank?
@otu = Otu.where(project_id: sessions_current_project_id).find(params.require(:otu_id))
if @otu.taxon_name
download = ::Export::Coldp.download_async(@otu, request.url, prefer_unlabelled_otus: !!params[:prefer_unlabelled_otus])
redirect_to file_download_path(download)
else
redirect_to export_coldp_task_path, notice: 'Please select an OTU that is linked to the nomenclature (has a taxon name).'
end
end
|