diff options
author | mr <mr@mrautenberg.de> | 2010-07-23 17:03:08 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2010-07-23 17:03:08 +0200 |
commit | 91acc6de3edf5c36b2f29c3c5659d4748302457c (patch) | |
tree | bcdbeb201916783ca2335edf0f855b1e6695f854 /lazar.rb | |
parent | d2267771bf6baca83838cdeb4436c33c799e224d (diff) |
testing AA
Diffstat (limited to 'lazar.rb')
-rwxr-xr-x | lazar.rb | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -292,6 +292,9 @@ end post '/?' do # create model halt 400, "MIME type \"#{request.content_type}\" not supported." unless request.content_type.match(/yaml/) model = Lazar.new + model.token_id = params["token_id"] if params["token_id"] + LOGGER.debug "mr create model post /model/? with token_id: #{model.token_id}" + #model.token_id = request.env["HTTP_TOKEN_ID"] if request.env["HTTP_TOKEN_ID"] model.save model.uri = url_for("/#{model.id}", :full) model.yaml = request.env["rack.input"].read @@ -307,6 +310,7 @@ post '/:id/?' do # create prediction @prediction = OpenTox::Dataset.new @prediction.creator = lazar.uri + @prediction.token_id = params[:token_id] dependent_variable = YAML.load(lazar.yaml).dependentVariables @prediction.title = URI.decode(dependent_variable.split(/#/).last) case dependent_variable |