module Marten::Handlers::Rendering
Overview
Provides the ability to generate HTTP responses with the content of rendered templates.
Direct including types
Defined in:
marten/handlers/concerns/rendering.crInstance Method Summary
-
#get_response(content)
Returns the expected HTTP response for a rendered template content.
-
#render_template(context : Hash | NamedTuple | Nil | Marten::Template::Context)
Renders the configured template for a specific
context
object. -
#render_to_response(context : Hash | NamedTuple | Nil | Marten::Template::Context)
Renders the configured template for a specific
context
object and produces an HTTP response. -
#template_name : String
Returns the template name that should be rendered by the handler.
Instance Method Detail
def render_template(context : Hash | NamedTuple | Nil | Marten::Template::Context)
#
Renders the configured template for a specific context
object.
def render_to_response(context : Hash | NamedTuple | Nil | Marten::Template::Context)
#
Renders the configured template for a specific context
object and produces an HTTP response.