Skip to content

1.5.0

Compare
Choose a tag to compare
@mworrell mworrell released this 18 Oct 15:19
· 33 commits to master since this release
b6f2088

This introduces an incompatibility where the variable m is now a reserved keyword.

Added support for models with an optional argument.
This is extensively used in Zotonic for accessing (database) models.

The syntax to access more rsc is:

{{ m.rsc.foo.bar::42 }}

This will call the model_call function in the runtime as:

Runtime:model_call(rsc, [ <<"foo">>, <<"bar">> ], 42, Context).

The argument is optional:

{{ m.rsc.foo.bar }}

Calls the model as:

Runtime:model_call(rsc, [ <<"foo">>, <<"bar">> ], undefined, Context).