summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2012-12-11 18:03:53 +0100
committerChristoph Helma <helma@in-silico.ch>2012-12-11 18:03:53 +0100
commit8881b2fedc8c047b212f1a37615fb9e84fe0b316 (patch)
tree40af9901bd2bc94092451ada0451eee76d450a45
parent9aa2330f4225bffb2afe7128cf47c24f46ad54b0 (diff)
fixed display for empty assays
-rw-r--r--application.rb8
1 files changed, 4 insertions, 4 deletions
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) : "<p><em>No PubChem data</em></p>"
+ @assays and !@assays.empty? ? haml(:targets, :layout => false) : "<p><em>No PubChem data</em></p>"
end
get '/cid/:cid/assays/:outcome' do
@assays = assays(params[:cid], params[:outcome]) - targets(params[:cid], params[:outcome])
- @assays ? haml(:assays, :layout => false) : "<p><em>No PubChem data</em></p>"
+ @assays and !@assays.empty? ? haml(:assays, :layout => false) : "<p><em>No PubChem data</em></p>"
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) : "<p><em>Insuffucient PubChem data for read across predictions.</em></p>"
+ @assays and !@assays.empty? ? haml(:predicted_assays, :layout => false) : "<p><em>Insuffucient PubChem data for read across predictions.</em></p>"
end
get '/cid/:cid/prediction/targets/:outcome' do
@assays = predicted_targets params[:cid], params[:outcome]
- @assays ? haml(:predicted_targets, :layout => false) : "<p><em>Insuffucient PubChem data for read across predictions.</em></p>"
+ @assays and !@assays.empty? ? haml(:predicted_targets, :layout => false) : "<p><em>Insuffucient PubChem data for read across predictions.</em></p>"
end
get '/cid/:cid/neighbors/?' do