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.cr

Instance Method Summary

Instance Method Detail

def content_type : String #

Returns the content type of the response.


[View source]
def render_to_response(context : Hash | NamedTuple | Nil | Marten::Template::Context = nil, status : ::HTTP::Status | Int32 = 200) #

Renders the configured template for a specific context object and produces an HTTP response.


[View source]
def template_name : String #

Returns the template name that should be rendered by the handler.


[View source]