lib/faastruby/server/runner_methods.rb in faastruby-0.5.23 vs lib/faastruby/server/runner_methods.rb in faastruby-0.5.24

- old
+ new

@@ -86,9 +86,13 @@ def render_nothing(status: 200, headers: {}) respond_with(nil, status: status, headers: headers, binary: false) end + def render_template(template_path, status: 200, headers: {}, variables: {}) + render html: FaaStRuby::Template.new(variables: variables).render(template_path), status: status, headers: headers + end + def redirect_to(function: nil, url: nil, status: 303) headers = {"Location" => function || url} respond_with(nil, status: status, headers: headers, binary: false) end \ No newline at end of file