diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-08-22 16:25:21 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-08-22 16:25:21 +0000 |
commit | a8f6072f32ef5ae650216a4612d13eeb6b310c7e (patch) | |
tree | 60cb79d76b74c94b46201038c260e083a626806f /application.rb | |
parent | f5eccd4ce22acb2fa05e84fb80e8385cce235d51 (diff) | |
parent | 4fc732ca31b07ba1469358836abf6ffd3c955098 (diff) |
Merge branch 'development' of github.com:opentox/toxcreate into development
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/application.rb b/application.rb index eb86916..9ef50f8 100644 --- a/application.rb +++ b/application.rb @@ -92,8 +92,7 @@ end get '/models/?' do @models = ToxCreateModel.all.sort(:order => "DESC") @models.each{|m| raise "internal redis error: model is nil" unless m} - subjectstring = @subjectid ? "?subjectid=#{CGI.escape(@subjectid)}" : "" - haml :models, :locals=>{:models=>@models, :subjectstring => subjectstring} + haml :models, :locals=>{:models=>@models} end get '/model/:id/status/?' do @@ -156,13 +155,12 @@ end get '/model/:id/:view/?' do response['Content-Type'] = 'text/plain' model = ToxCreateModel.get(params[:id]) - subjectstring = @subjectid ? "?subjectid=#{CGI.escape(@subjectid)}" : "" begin case params[:view] when "model" - haml :model, :locals=>{:model=>model,:subjectstring => subjectstring}, :layout => false + haml :model, :locals=>{:model=>model}, :layout => false when /validation/ - haml :validation, :locals=>{:model=>model,:subjectstring => subjectstring}, :layout => false + haml :validation, :locals=>{:model=>model}, :layout => false else return "unable to render model: id #{params[:id]}, view #{params[:view]}" end |