%table - unless features[:activating].empty? %tr %th - if @value_map.empty? activating - else predominatly in compounds with activity = "\"#{@value_map[@value_map.keys.sort.last]}\"" ( %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS ) %th p value - if features[:activating] - features[:activating].sort{|a,b| b[:p_value] <=> a[:p_value] }.each do |f| %tr %td= f[:smarts] %td= f[:p_value] - unless features[:deactivating].empty? %tr %th - if @value_map.empty? deactivating - else predominatly in compounds with activity = "\"#{@value_map[@value_map.keys.sort.first]}\"" ( %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS ) %th p value - if features[:deactivating] - features[:deactivating].sort{|a,b| b[:p_value] <=> a[:p_value] }.each do |f| %tr %td= f[:smarts] %td= f[:p_value]