-
Notifications
You must be signed in to change notification settings - Fork 584
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
Remove list guard in Plug.Conn.merge_assigns and merge_private #1152
Conversation
Can you please provide examples of use cases? |
I don't know why this limitation exists in the first place, I haven't found anything about this in original PR or commit messages Here's an example from my codebase static_assigns = static_assigns()
dynamic_assigns =
categories_assigns
|> Map.merge(item_assigns)
|> Map.merge(brands_assigns)
|> Map.merge(overrides)
|> Enum.to_list() # This is unnecessary
conn
|> merge_assigns(static_assigns)
|> merge_assigns(dynamic_assigns) |
I'm ok with a generic enumerable, but the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this, @josevalim your call though! 🙃
@whatyouhide @josevalim ping |
💚 💙 💜 💛 ❤️ |
…r-plug#1152) drop 3627b20 Changed from passive to active voice, edited for consistency and conciseness
Just a more flexible solution