diff options
author | mr <mr@mrautenberg.de> | 2011-03-15 12:14:14 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-03-15 12:14:14 +0100 |
commit | a6ee4587bfcb565e87ab597b4e1156467ab67152 (patch) | |
tree | 563790ef82305a2f12874af6eafe697b3cc40224 /application.rb | |
parent | 37b3ecfa4bb27b2eb9ffe8efa7bf8a4d32cf1dca (diff) |
sorting of models, created_at automation, ohm::callback
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application.rb b/application.rb index 1ab6576..243333c 100644 --- a/application.rb +++ b/application.rb @@ -70,7 +70,7 @@ get '/login' do end get '/models/?' do - @models = ToxCreateModel.all#.to_a.reverse + @models = ToxCreateModel.all.sort.reverse subjectstring = session[:subjectid] ? "?subjectid=#{CGI.escape(session[:subjectid])}" : "" haml :models, :locals=>{:models=>@models, :subjectstring => subjectstring} end @@ -192,7 +192,7 @@ post '/models' do # create a new model task = OpenTox::Task.create("Uploading dataset and creating lazar model",url_for("/models",:full)) do |task| task.progress(5) - @model.update :task_uri => task.uri, :status => "Uploading and saving dataset" + @model.update :status => "Uploading and saving dataset", :task_uri => task.uri begin @dataset = OpenTox::Dataset.create(nil, subjectid) # check format by extension - not all browsers provide correct content-type]) |