From 6a461ec9270b3d7c5ab213d1ba523a8b581ea3d5 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 3 Oct 2019 20:53:30 -0400 Subject: [PATCH] fix macro usage --- lib/philomena/search/parser.ex | 4 ++-- lib/philomena_web/templates/user_attribution/_user.html.slime | 0 lib/philomena_web/views/user_attribution_view.ex | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 lib/philomena_web/templates/user_attribution/_user.html.slime create mode 100644 lib/philomena_web/views/user_attribution_view.ex diff --git a/lib/philomena/search/parser.ex b/lib/philomena/search/parser.ex index 80e8062e..13489420 100644 --- a/lib/philomena/search/parser.ex +++ b/lib/philomena/search/parser.ex @@ -1,7 +1,7 @@ defmodule Philomena.Search.Parser do defmacro defparser(name, opts) do - field_transforms = Keyword.get(opts, :transforms, %{}) |> Macro.escape - field_aliases = Keyword.get(opts, :aliases, %{}) |> Macro.escape + field_transforms = Keyword.get(opts, :transforms, Macro.escape(%{})) + field_aliases = Keyword.get(opts, :aliases, Macro.escape(%{})) default_field = Keyword.fetch!(opts, :default) quote location: :keep do diff --git a/lib/philomena_web/templates/user_attribution/_user.html.slime b/lib/philomena_web/templates/user_attribution/_user.html.slime new file mode 100644 index 00000000..e69de29b diff --git a/lib/philomena_web/views/user_attribution_view.ex b/lib/philomena_web/views/user_attribution_view.ex new file mode 100644 index 00000000..945aa164 --- /dev/null +++ b/lib/philomena_web/views/user_attribution_view.ex @@ -0,0 +1,3 @@ +defmodule PhilomenaWeb.UserAttributionView do + use PhilomenaWeb, :view +end