summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/application.rb b/application.rb
index 6229178..ad13b0d 100644
--- a/application.rb
+++ b/application.rb
@@ -1,5 +1,5 @@
require 'rubygems'
-gem "opentox-ruby-api-wrapper", "= 1.5.7"
+gem "opentox-ruby-api-wrapper", "= 1.6.0"
require 'opentox-ruby-api-wrapper'
LOGGER.progname = File.expand_path(__FILE__)
@@ -17,6 +17,21 @@ DataMapper.auto_upgrade!
require 'lazar.rb'
+
+helpers do
+ def activity(a)
+ case a.to_s
+ when "true"
+ act = "active"
+ when "false"
+ act = "inactive"
+ else
+ act = "not available"
+ end
+ act
+ end
+end
+
get '/?' do # get index of models
response['Content-Type'] = 'text/uri-list'
Model.all(params).collect{|m| m.uri}.join("\n") + "\n"