Skip to content

Smoothie 3.0: caution breaking change!

Latest
Compare
Choose a tag to compare
@jfrolich jfrolich released this 21 Feb 03:44
· 24 commits to master since this release

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.