defmodule MemexWeb.ControllerHelpers do
  @moduledoc """
  Implements controller helpers
  """

  import Plug.Conn, only: [assign: 3]

  def assign(conn, assigns) do
    assigns
    |> Map.new()
    |> Enum.reduce(conn, fn {key, value}, conn -> conn |> assign(key, value) end)
  end
end
