From 5bcf667bcebb47d7a49995bce973140a4fc9785f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20M=C3=A4nnchen?= Date: Mon, 11 May 2020 18:34:05 +0100 Subject: [PATCH 1/3] Optionally define is_struct --- web/ex_admin/errors_helper.ex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 From 1d29c6d2b426d3dee1da73868efc101a6a7cddba Mon Sep 17 00:00:00 2001 From: reetou Date: Tue, 31 Dec 2019 16:52:48 +0300 Subject: [PATCH 2/3] Add float to allowed types --- lib/ex_admin/form.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 15a1b90ee950d31ff69fd6898cb776650688c906 Mon Sep 17 00:00:00 2001 From: Ian Warshak Date: Thu, 25 Jun 2020 11:05:52 -0500 Subject: [PATCH 3/3] use static_path instead of static_url --- web/templates/layout/active_admin.html.eex | 6 +++--- web/templates/layout/admin_lte2.html.eex | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) 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() %> <%= site_title() %> - "> + "> - + <%= case Application.get_env(:ex_admin, :head_template) do {layout, template} -> @@ -55,7 +55,7 @@ - + + @@ -69,8 +69,8 @@ $.widget.bridge('uibutton', $.ui.button); - - + +