From 01ffd80c658d4f33aff4d537a6e1ec09e8a7cd4b Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 28 Jun 2018 12:11:52 +0000 Subject: removed doubled insertion --- application.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/application.rb b/application.rb index 523eb10..5acd9cc 100644 --- a/application.rb +++ b/application.rb @@ -172,7 +172,6 @@ get '/predict/csv/:task/:model/:filename/?' do task = Task.find params[:task].to_s m = Model::Validation.find params[:model].to_s unless params[:model] == "Cramer" dataset = Batch.find_by(:name => filename) - @ids = dataset.ids warnings = dataset.warnings.blank? ? nil : dataset.warnings.join("\n") unless warnings.nil? keys_array = [] @@ -197,11 +196,6 @@ get '/predict/csv/:task/:model/:filename/?' do header = lines.shift out = "" lines.each_with_index do |line,idx| - if !@ids.blank? - arr = line.split(",") - arr.insert(1, @ids[idx]) - line = arr.join(",") - end if @dups[idx+1] out << "#{line.tr("\n","")},#{@dups[idx+1]}" else -- cgit v1.2.3