From 55b4ae338d1e07ac3325521d6f10ca6792d8b46f Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 24 May 2011 12:22:54 +0000 Subject: error message if prediction value nil --- application.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'application.rb') diff --git a/application.rb b/application.rb index 67a46d1..c49242a 100644 --- a/application.rb +++ b/application.rb @@ -366,6 +366,11 @@ post '/predict/?' do # post chemical name to model :title => model.name, :error => prediction.metadata[OT.error] } + elsif prediction_dataset.value(@compound).nil? + @predictions << { + :title => model.name, + :error => "Not enough similar compounds in training dataset." + } else @predictions << { :title => model.name, -- cgit v1.2.3