From 871a5fe755b468da6ad2ced5eb2f88587d964b12 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Fri, 5 Jun 2020 14:20:26 +0000 Subject: [PATCH] Add `render_xml` helper function --- src/util.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util.cr b/src/util.cr index e6008fb..3aea0b7 100644 --- a/src/util.cr +++ b/src/util.cr @@ -127,3 +127,7 @@ def validate_password(password) raise "password should contain ASCII characters only" end end + +macro render_xml(path) + send_file env, ECR.render({{path}}).to_slice, "application/xml" +end