refactor: fix Credo warnings in field visibility modules
Use Enum.map_join and reduce nesting in format_custom_field_label
This commit is contained in:
parent
4bbba65038
commit
690083bdf0
2 changed files with 11 additions and 12 deletions
|
|
@ -198,8 +198,7 @@ defmodule MvWeb.MemberLive.Index.FieldSelection do
|
|||
def to_url_param(selection) when is_map(selection) do
|
||||
selection
|
||||
|> Enum.filter(fn {_field, visible} -> visible end)
|
||||
|> Enum.map(fn {field, _visible} -> field end)
|
||||
|> Enum.join(",")
|
||||
|> Enum.map_join(",", fn {field, _visible} -> field end)
|
||||
end
|
||||
|
||||
def to_url_param(_), do: ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue