Fix assign_async return docs#4236
Merged
Merged
Conversation
jyotikushwah15994-del
approved these changes
May 17, 2026
SteffenDE
reviewed
May 18, 2026
| The function must return either a map or a keyword list with the assigns | ||
| to merge into the socket. | ||
| The function must return either `{:ok, assigns}` or `{:error, reason}`, | ||
| where `assigns` is a map with the keys passed to `assign_async/3`. |
Collaborator
There was a problem hiding this comment.
A keyword list should work
Suggested change
| where `assigns` is a map with the keys passed to `assign_async/3`. | |
| where `assigns` is a map or keyword list with the keys passed to `assign_async/3`. |
Contributor
Author
There was a problem hiding this comment.
It doesn't work when keyword list is used:
Also just tested it manually again.
Collaborator
There was a problem hiding this comment.
Hmm I guess the list check here is unnecessary then:
- if it never worked, we can adjust the documentation indeed
Contributor
Author
|
@SteffenDE what you think for current state of the PR? |
SteffenDE
approved these changes
May 18, 2026
Comment on lines
+235
to
+236
| assert html =~ "data: 123" | ||
| refute html =~ "expected assign_async to return" |
Collaborator
There was a problem hiding this comment.
So this assertion actually relied on the error message. A good example for a bad test 😅
Collaborator
|
🙌🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.