diff options
author | mr <mr@mrautenberg.de> | 2011-09-14 16:10:13 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-09-14 16:10:13 +0200 |
commit | a8b6b8debe373b3c936d6cbf863c38ff2862441b (patch) | |
tree | 5e825796571d1937588970c30b23eeffd0a34316 | |
parent | 05d133d09aba7c1853ae597c7c95cf6dc8e9912f (diff) |
have json representation for HTML output
-rw-r--r-- | lazar.rb | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -37,7 +37,8 @@ get '/:id/?' do send_file @json_file, :type => 'application/json' when /html/ response['Content-Type'] = 'text/html' - OpenTox.text_to_html File.read(yaml_file(params[:id])) + #OpenTox.text_to_html File.read(yaml_file(params[:id])) + OpenTox.text_to_html JSON.pretty_generate(JSON.parse(File.read(@json_file))) else raise OpenTox::BadRequestError.new "Unsupported MIME type '#{@accept}'" end |