class Marten::Template::Tag::CsrfToken

Overview

The csrf_token template tag.

The csrf_token template tag allows to compute and insert the value of the CSRF token into a template. This tag requires the presence of a handler object in the template context (under the "handler" key), otherwise an empty token is returned.

Defined in:

marten/template/tag/csrf_token.cr

Constructors

Instance Method Summary

Instance methods inherited from class Marten::Template::Tag::Base

render(context : Context) : String render

Constructor methods inherited from class Marten::Template::Tag::Base

new(parser : Parser, source : String) new

Constructor Detail

def self.new(_parser : Parser, _source : String) #

[View source]

Instance Method Detail

def render(context : Context) : String #
Description copied from class Marten::Template::Tag::Base

Render the template tag for a given context.


[View source]