diff --git a/lib/cannery_web.ex b/lib/cannery_web.ex index 5239169..e0b4704 100644 --- a/lib/cannery_web.ex +++ b/lib/cannery_web.ex @@ -98,6 +98,7 @@ defmodule CanneryWeb do import CanneryWeb.ErrorHelpers import CanneryWeb.Gettext + import CanneryWeb.ViewHelpers alias CanneryWeb.Router.Helpers, as: Routes end end diff --git a/lib/cannery_web/views/view_helpers.ex b/lib/cannery_web/views/view_helpers.ex new file mode 100644 index 0000000..3f68539 --- /dev/null +++ b/lib/cannery_web/views/view_helpers.ex @@ -0,0 +1,34 @@ +defmodule CanneryWeb.ViewHelpers do + @moduledoc """ + Contains common helpers that can be used in liveviews and regular views. These + are automatically imported into any Phoenix View using `use CanneryWeb, + :view` + """ + + import Phoenix.LiveView.Helpers + + @doc """ + Returns a