String comparison in Elixir

I’m trying to compare to bits of string in Elixir - if they’re equal then the if block fires or the else block should fire.

def show(conn, %{"id" => id}) do id "----------" conn.assigns.current_user
    if conn.assigns.current_user == id do
        professional = Repo.get!(Professional, id)
        render(conn, "show.html", professional: professional)
      |> put_flash(:error, "You must be logged in for that!")
      |> redirect(to: site_path(conn, :index))
      |> halt()

In the above, id and conn.assigns.current_user both return the same thing, but the if block is never entered.

What am I doing wrong?

Try to call inspect on both of them, like inspect(id).

Maybe one of them is an int and the other is a string.

If that is the case, by setting up the calls to inspect, the int one will show up like 42 and the string one will show up like "42".