diff options
author | mr <mr@mrautenberg.de> | 2010-07-20 15:26:17 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2010-07-20 15:26:17 +0200 |
commit | d2267771bf6baca83838cdeb4436c33c799e224d (patch) | |
tree | 600c4c5543e9d19d38e0f2208f0f8fb706ced76f /application.rb | |
parent | 763cdff161108afdcd19e31ed0dbfe6dc2a5e078 (diff) | |
parent | 26aa9a42990a958f53f326f3ccaed3848d21fd97 (diff) |
Merge remote branch 'helma/master' into development
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 17 |
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" |