Skip to content

Commit 31ff834

Browse files
authored
Merge pull request #112 from mariusbutuc/patch-1
Refactor local storage example: `whitelist` » `acceptlist`
2 parents 3bbbe53 + eb49642 commit 31ff834

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: documentation/examples/local.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ defmodule Avatar do
1313
use Waffle.Definition
1414

1515
@versions [:original, :thumb]
16-
@extension_whitelist ~w(.jpg .jpeg .gif .png)
16+
@extension_acceptlist ~w(.jpg .jpeg .gif .png)
1717

1818
def validate({file, _}) do
1919
file_extension = file.file_name |> Path.extname |> String.downcase
2020

21-
case Enum.member?(@extension_whitelist, file_extension) do
21+
case Enum.member?(@extension_acceptlist, file_extension) do
2222
true -> :ok
2323
false -> {:error, "file type is invalid"}
2424
end

0 commit comments

Comments
 (0)