I ran into a brick wall when I tried to get something like this to work:
%img{src: image(@current_user, 300)}
image/2 is defined in the view, but I always get the error undefined function image/0.
It's no problem with plain values or functions/0. Btw something like this does also not work: %p{alt: @current_user.name}. With this I get protocol Phoenix.HTML.Safe not implemented for %MyApp.User{__meta__: #Ecto.Schema.Metadata....
I ran into a brick wall when I tried to get something like this to work:
%img{src: image(@current_user, 300)}
image/2
is defined in the view, but I always get the errorundefined function image/0
.It's no problem with plain values or functions/0. Btw something like this does also not work:
%p{alt: @current_user.name}
. With this I getprotocol Phoenix.HTML.Safe not implemented for %MyApp.User{__meta__: #Ecto.Schema.Metadata...
.