swiss v3.4.3 Swiss.Phoenix.Controller View Source

Helper functions for Phoenix controllers.

Link to this section Summary

Functions

Redirects back to the referer, or to fallback when missing.

Returns 204 No Content.

Link to this section Functions

Link to this function

redirect_back(conn, fallback \\ "/")

View Source
redirect_back(Plug.Conn.t(), String.t()) :: Plug.Conn.t()

Redirects back to the referer, or to fallback when missing.

Does not redirect back to an external host.

Link to this function

render_no_content(conn)

View Source
render_no_content(Plug.Conn.t()) :: Plug.Conn.t()

Returns 204 No Content.