From 8881b2fedc8c047b212f1a37615fb9e84fe0b316 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 11 Dec 2012 18:03:53 +0100 Subject: fixed display for empty assays --- application.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'application.rb') diff --git a/application.rb b/application.rb index cb387be..532135c 100644 --- a/application.rb +++ b/application.rb @@ -153,22 +153,22 @@ class Application < Sinatra::Base get '/cid/:cid/targets/:outcome' do @assays = targets params[:cid], params[:outcome] - @assays ? haml(:targets, :layout => false) : "

No PubChem data

" + @assays and !@assays.empty? ? haml(:targets, :layout => false) : "

No PubChem data

" end get '/cid/:cid/assays/:outcome' do @assays = assays(params[:cid], params[:outcome]) - targets(params[:cid], params[:outcome]) - @assays ? haml(:assays, :layout => false) : "

No PubChem data

" + @assays and !@assays.empty? ? haml(:assays, :layout => false) : "

No PubChem data

" end get '/cid/:cid/prediction/assays/:outcome' do @assays = predicted_assays(params[:cid], params[:outcome]) - predicted_targets(params[:cid], params[:outcome]) - @assays ? haml(:predicted_assays, :layout => false) : "

Insuffucient PubChem data for read across predictions.

" + @assays and !@assays.empty? ? haml(:predicted_assays, :layout => false) : "

Insuffucient PubChem data for read across predictions.

" end get '/cid/:cid/prediction/targets/:outcome' do @assays = predicted_targets params[:cid], params[:outcome] - @assays ? haml(:predicted_targets, :layout => false) : "

Insuffucient PubChem data for read across predictions.

" + @assays and !@assays.empty? ? haml(:predicted_targets, :layout => false) : "

Insuffucient PubChem data for read across predictions.

" end get '/cid/:cid/neighbors/?' do -- cgit v1.2.3