diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-08-25 12:28:39 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-08-25 12:28:39 +0200 |
commit | ab9a669b922b3a7c72a60e96e2bbf65c062b05ab (patch) | |
tree | 2d32367819457a2b9c6480a2dd0a4effc2d648e4 /application.rb | |
parent | 6b422d9c03a0f72785d4f7bde9bd384835e5ce5a (diff) |
initial version for quantitative features, some improvements suggested by david
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/application.rb b/application.rb index 9f511e7..0bca96f 100644 --- a/application.rb +++ b/application.rb @@ -1,7 +1,7 @@ ['rubygems', "haml", "sass", "rack-flash"].each do |lib| require lib end -gem "opentox-ruby-api-wrapper", "= 1.6.3" +gem "opentox-ruby-api-wrapper", "= 1.6.4" require 'opentox-ruby-api-wrapper' gem 'sinatra-static-assets' require 'sinatra/static_assets' @@ -49,21 +49,22 @@ end get '/model/:id/:view/?' do response['Content-Type'] = 'text/plain' model = ToxCreateModel.get(params[:id]) - model.process - model.save begin + model.process + model.save case params[:view] when "model" haml :model, :locals=>{:model=>model}, :layout => false when /validation/ - if model.type == "classification" - haml :classification_validation, :locals=>{:model=>model}, :layout => false - elsif model.type == "regression" - haml :regression_validation, :locals=>{:model=>model}, :layout => false - else - return "Unknown model type '#{model.type}'" - end + haml :validation, :locals=>{:model=>model}, :layout => false + #if model.type == "classification" + #haml :classification_validation, :locals=>{:model=>model}, :layout => false + #elsif model.type == "regression" + #haml :regression_validation, :locals=>{:model=>model}, :layout => false + #else + #return "Unknown model type '#{model.type}'" + #end else return "unable to render model: id #{params[:id]}, view #{params[:view]}" end |