diff --git a/lib/ex_admin/form.ex b/lib/ex_admin/form.ex index 1c8c3714..cb1bbf81 100644 --- a/lib/ex_admin/form.ex +++ b/lib/ex_admin/form.ex @@ -1311,7 +1311,7 @@ defmodule ExAdmin.Form do end def build_control({:array, type}, resource, opts, model_name, field_name, ext_name) - when type in ~w(string integer)a do + when type in ~w(string integer float)a do name = "#{model_name}-#{field_name}" # currently we only support select 2 diff --git a/web/ex_admin/errors_helper.ex b/web/ex_admin/errors_helper.ex index f77fe916..c4454f54 100644 --- a/web/ex_admin/errors_helper.ex +++ b/web/ex_admin/errors_helper.ex @@ -85,6 +85,12 @@ defmodule ExAdmin.ErrorsHelper do end) end - defp is_struct(%{__struct__: _}), do: true - defp is_struct(_), do: false + # Checking via version since Kernel.function_exported?(Kernel, :is_struct, 1) reports false + System.version() + |> Version.parse! + |> Version.match?("~> 1.10") + |> unless do + defp is_struct(%{__struct__: _}), do: true + defp is_struct(_), do: false + end end diff --git a/web/templates/layout/active_admin.html.eex b/web/templates/layout/active_admin.html.eex index fbbb28a1..d03da1ad 100644 --- a/web/templates/layout/active_admin.html.eex +++ b/web/templates/layout/active_admin.html.eex @@ -10,10 +10,10 @@ <%= favicon() %>