mirror of
https://github.com/ash-project/ash_phoenix.git
synced 2024-09-19 23:02:48 +12:00
improvement: support latest phoenix
This commit is contained in:
parent
b088969315
commit
3b56ee5d2c
2 changed files with 12 additions and 3 deletions
|
@ -589,8 +589,17 @@ defmodule AshPhoenix.LiveView do
|
||||||
|
|
||||||
defp mark_page_as_first(page), do: page
|
defp mark_page_as_first(page), do: page
|
||||||
|
|
||||||
defp assign(%Phoenix.LiveView.Socket{} = socket, one, two) do
|
case Code.ensure_compiled(Phoenix.LiveView.Component) do
|
||||||
Phoenix.LiveView.assign(socket, one, two)
|
{:module, _} ->
|
||||||
|
if function_exported?(Phoenix.LiveView.Component, :assign, 3) do
|
||||||
|
defp assign(%Phoenix.LiveView.Socket{} = socket, one, two) do
|
||||||
|
Phoenix.Component.assign(socket, one, two)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
defp assign(%Phoenix.LiveView.Socket{} = socket, one, two) do
|
||||||
|
Phoenix.LiveView.assign(socket, one, two)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp assign(socket, one, two) do
|
defp assign(socket, one, two) do
|
||||||
|
|
2
mix.exs
2
mix.exs
|
@ -116,7 +116,7 @@ defmodule AshPhoenix.MixProject do
|
||||||
defp deps do
|
defp deps do
|
||||||
[
|
[
|
||||||
{:ash, ash_version("~> 2.0.0-rc.9")},
|
{:ash, ash_version("~> 2.0.0-rc.9")},
|
||||||
{:phoenix, "~> 1.5.6 or ~> 1.6.0"},
|
{:phoenix, "~> 1.5.6 or ~> 1.6"},
|
||||||
{:phoenix_html, "~> 2.14 or ~> 3.0"},
|
{:phoenix_html, "~> 2.14 or ~> 3.0"},
|
||||||
{:phoenix_live_view, "~> 0.15"},
|
{:phoenix_live_view, "~> 0.15"},
|
||||||
{:git_ops, "~> 2.4.4", only: :dev},
|
{:git_ops, "~> 2.4.4", only: :dev},
|
||||||
|
|
Loading…
Reference in a new issue