Skip to content

Releases: jfrolich/smoothie

Smoothie 3.0: caution breaking change!

21 Feb 03:44
Compare
Choose a tag to compare

This release is a breaking change. When you pass attributes to the template function (such as welcome_html(user: user)), previously you needed <%= user %> in your template to reference the user attribute. This worked by using a naive implementation, and this is why in the previous version it was impossible to do other things in elixir syntax than just including that variable (for instance <%= String.upcase(user) %> would not work). This is changed in 3.0.0 however we need to change our templates to invoke attributes using module attributes: <%= @user %>. This is more in line of how the templating works in the rest of elixir, and allows us to build more flexible templates.