Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Don't render the inner_block assign when building element attributes #132

Closed
mhanberg opened this issue May 27, 2021 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@mhanberg
Copy link
Owner

Description can be seen here: https://elixirforum.com/t/temple-html-dsl-for-elixir-and-phoenix/23940/29?u=mhanberg

this should reject the inner_block key and not render it

assigns = [class: "foo", inner_block: fn x -> "could be any type tho" end]

div assigns do
  # ...
end
<div class="foo">
  <!-- ... -->
</div>

Currently, this will attempt to render it, but a function does not implement the phoenix Safe protocol, so it fails.

We can also potentially emit a warning if you try to pass types that cannot be rendered, so that the user is aware of why it's not "working".

@mhanberg mhanberg added the bug Something isn't working label May 27, 2021
@mhanberg
Copy link
Owner Author

This actually works as expected and is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant