diff options
author | mr <mr@mrautenberg.de> | 2011-05-23 13:34:49 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-05-23 13:34:49 +0200 |
commit | b7c063f7c256003e2e67ed0a626403de15f01a9b (patch) | |
tree | 9ba2cc8f2d557822d4ee626232a6b50074917a53 /application.rb | |
parent | 549da2772bed27de7c3ec69e47e76b5ddd5e07b6 (diff) | |
parent | 3ed74a342d389e4fa6f8507a983d29a1ac95862a (diff) |
Merge branch 'development' of github.com:opentox/model into development
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/application.rb b/application.rb index 79cddf0..6e1dcd7 100644 --- a/application.rb +++ b/application.rb @@ -16,13 +16,14 @@ end before do @accept = request.env['HTTP_ACCEPT'] @accept = 'application/rdf+xml' if @accept == '*/*' or @accept == '' or @accept.nil? + response['Content-Type'] = @accept @id = request.path_info.match(/^\/\d+/) unless @id.nil? @id = @id.to_s.sub(/\//,'').to_i @uri = uri @id @yaml_file = "public/#{@id}.yaml" - halt 404, "Dataset #{@id} not found." unless File.exists? @yaml_file + halt 404, "Model #{@id} not found." unless File.exists? @yaml_file end # make sure subjectid is not included in params, subjectid is set as member variable |