Packages

NavEx is the navigation history package for Elixir/Phoenix Framework. It uses adapter pattern and lets you choose between a few adapters to keep your users navigation history.

Current section

Files

Jump to
nav_ex lib plug.ex
Raw

lib/plug.ex

defmodule NavEx.Plug do
@moduledoc """
This is the Plug gathering data about visited paths.
"""
@doc false
def init(opts), do: opts
@doc false
def call(%Plug.Conn{} = conn, _opts) do
{:ok, conn} = NavEx.insert(conn)
conn
end
end