Hello! I have been trying to follow stackoverflow to sync elements in two different templates. I came up with the code below as part of this, but get the following compiler error:
== Compilation error on file lib/plugs.ex ==
** (CompileError) lib/plugs.ex:8: undefined function assign/3
Here is the code:
defmodule LookupPhoenix.Plug.Site do
def init(default), do: default
def call(conn, opts) do
assign conn, :site, Keyword.get(opts, :site)
end
end
And here is how I call it:
plug LookupPhoenix.Plug.Site, site: site
Advice?