NavEx.Adapters.ETS (NavEx v0.1.7)

View Source

NavEx.Adapters.ETS is adapter for keeping user's navigation history utilizing ETS. It uses NavEx.Adapters.ETS.RecordsStorage as the module to interact with the ETS table.

## Adapter config adapter_config: %{

  identity_key: "nav_ex_identity", # name of the key in session where the user's identity is saved
  table_name: :navigation_history # name of the ETS table

}

## This adapter supports both Plug.Conn and Phoenix.LiveView.Socket. For LiveView sockets you have to make sure to put the same user's identity that was stored in the session into the socket assigns under the identity key (as atom!).