Use component templates

This commit is contained in:
Alex Ling
2020-06-06 12:00:02 +00:00
parent 8b04f2c96b
commit 1ddcabcc12
5 changed files with 73 additions and 72 deletions
+4
View File
@@ -143,3 +143,7 @@ def set_token_cookie(env, token)
cookie.expires = Time.local.shift years: 1
env.response.cookies << cookie
end
macro render_component(filename)
render "src/views/components/#{{{filename}}}.ecr"
end