module Marten::Template::Object
Overview
Allows to add support for custom classes to template contexts.
Including this module in a class will make it "compatible" with the template engine so that instances of this class can be included in context objects.
Direct including types
- Marten::Core::Validation::ErrorSet
- Marten::DB::Field::File::File
- Marten::DB::Query::Page(M)
- Marten::DB::Query::Paginator(M)
- Marten::DB::Query::Set(M)
- Marten::HTTP::FlashStore
- Marten::Schema
- Marten::Schema::BoundField
- Marten::Template::Object::Auto
- Marten::Template::Object::Enum
Defined in:
marten/template/object.crmarten/template/object/auto.cr
marten/template/object/enum.cr
Macro Summary
-
template_attributes(*names)
Allows to explicitly configure which methods are made available to the template engine.
Macro Detail
macro template_attributes(*names)
#
Allows to explicitly configure which methods are made available to the template engine.
Only public mehtods that don't require arguments should be made available to templates.