From 6bac36708c0eb868ba311dcd099b6c32047f90ac Mon Sep 17 00:00:00 2001 From: gebele Date: Wed, 11 Sep 2013 14:03:17 +0200 Subject: data_entries to logger output --- views/neighbors.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'views/neighbors.haml') diff --git a/views/neighbors.haml b/views/neighbors.haml index 51ddb9d..ceef79c 100644 --- a/views/neighbors.haml +++ b/views/neighbors.haml @@ -83,17 +83,21 @@ - count = 0 - p.compounds.each do |neighbor_compound| / prevent conversion of nil - - c = p.data_entries[count][2] != nil ? p.data_entries[count][2] : '' + - c = p.data_entries[count][2] != nil ? p.data_entries[count][2] : '' + - $logger.debug "inspect c :#{c}\n" - case c - when /(0|false)/ - c = "non-carcinogen" - when /(1|true)/ - c = "carcinogen" + - else + - c = Array.new + - c[0] = p.data_entries[count][2] %tr %td.compound %img{:src=>"#{neighbor_compound.uri}/image", :alt=>"Compound image not available", :width=>"150px"} %td{:class => c[0]} - = c #p.data_entries[count][2] + = c[0] #p.data_entries[count][2] %td{:class => c[0]} = p.data_entries[count][3] != nil ? p.data_entries[count][3].round(3) : "Not enough similar compounds in training dataset." %td -- cgit v1.2.3