From a8b6b8debe373b3c936d6cbf863c38ff2862441b Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 14 Sep 2011 16:10:13 +0200 Subject: have json representation for HTML output --- lazar.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lazar.rb b/lazar.rb index 481a59d..3af6c1c 100644 --- a/lazar.rb +++ b/lazar.rb @@ -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 -- cgit v1.2.3