Skip to content

Commit

Permalink
Update Phoenix Liveview
Browse files Browse the repository at this point in the history
  • Loading branch information
alanvardy committed Dec 19, 2024
1 parent 7bf20ea commit f7c8f2a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions lib/exzeitable/database.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ defmodule Exzeitable.Database do
query
end

defp modify_query(query, %Params{query_modifier: {mod, fun}} = params) when is_atom(mod) and is_atom(fun) do
apply(mod, fun, [query, params])
defp modify_query(query, %Params{query_modifier: {mod, fun}} = params)
when is_atom(mod) and is_atom(fun) do
apply(mod, fun, [query, params])
end

defp modify_query(_query, %Params{query_modifier: invalid}) do
Expand Down
2 changes: 0 additions & 2 deletions lib/exzeitable/html/format.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ defmodule Exzeitable.HTML.Format do
|> format_field(fields[key].formatter)
end

# coveralls-ignore-stop

@doc "Will output the user supplied label or fall back on the atom"
@spec header(Params.t(), {atom, map}) :: String.t()
def header(_params, {_key, %{label: label}}) when is_binary(label), do: label
Expand Down
6 changes: 3 additions & 3 deletions lib/test_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ defmodule TestWeb do
def controller do
quote do
use Phoenix.Controller, namespace: TestWeb
use Gettext, backend: TestWeb.Gettext

import Plug.Conn
import TestWeb.Gettext
alias TestWeb.Router.Helpers, as: Routes
import Phoenix.LiveView.Controller
end
Expand All @@ -41,9 +41,9 @@ defmodule TestWeb do
import Phoenix.HTML
import Phoenix.HTML.Form
use PhoenixHTMLHelpers
use Gettext, backend: TestWeb.Gettext

import TestWeb.ErrorHelpers
import TestWeb.Gettext
alias TestWeb.Router.Helpers, as: Routes

import Phoenix.LiveView.Helpers
Expand All @@ -62,7 +62,7 @@ defmodule TestWeb do
def channel do
quote do
use Phoenix.Channel
import TestWeb.Gettext
use Gettext, backend: TestWeb.Gettext
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/test_web/gettext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ defmodule TestWeb.Gettext do
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
"""
use Gettext, otp_app: :exzeitable
use Gettext.Backend, otp_app: :exzeitable
end

0 comments on commit f7c8f2a

Please sign in to comment.