 
   def generate_slug do
     16
-    |> :crypto.strong_rand_bytes
-    |> :base64.encode
+    |> :crypto.strong_rand_bytes()
+    |> :base64.encode()
     |> String.replace(~r/[^A-Za-z0-9]/, "")
     |> String.slice(0, 10)
-    |> String.downcase
+    |> String.downcase()
   end
 
   def twitter_description(post) do


  def slugified_title(title) do
    title
    |> String.downcase
    |> String.replace(~r/[^A-Za-z0-9\s-]/, "")
    |> String.replace(~r/(\s|-)+/, "-")
  end

      nil ->
        generate_slug()
        |> (&put_change(changeset, :slug, &1)).()

      _ ->
        changeset
    end
