From b11ae51446fc544338bf1595b1f7fcedf893fab9 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 12 Jun 2024 21:47:15 -0400 Subject: [PATCH] Fix compile warnings --- lib/philomena_web/controllers/profile_controller.ex | 2 +- lib/philomena_web/templates/markdown/_input.html.slime | 6 +++--- .../templates/profile/commission/_form.html.slime | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/philomena_web/controllers/profile_controller.ex b/lib/philomena_web/controllers/profile_controller.ex index b5f1020d..75f476d4 100644 --- a/lib/philomena_web/controllers/profile_controller.ex +++ b/lib/philomena_web/controllers/profile_controller.ex @@ -212,7 +212,7 @@ defmodule PhilomenaWeb.ProfileController do end defp individual_stat(mapping, stat_name) do - Enum.map(89..0, &(map_fetch(mapping[&1], stat_name) || 0)) + Enum.map(89..0//-1, &(map_fetch(mapping[&1], stat_name) || 0)) end defp map_fetch(nil, _field_name), do: nil diff --git a/lib/philomena_web/templates/markdown/_input.html.slime b/lib/philomena_web/templates/markdown/_input.html.slime index 8ec1ae19..7cc63336 100644 --- a/lib/philomena_web/templates/markdown/_input.html.slime +++ b/lib/philomena_web/templates/markdown/_input.html.slime @@ -1,6 +1,6 @@ - form = assigns[:f] -- action_text = assigns[:action_text] || 'Edit' -- action_icon = assigns[:action_icon] || 'edit' +- action_text = assigns[:action_text] || "Edit" +- action_icon = assigns[:action_icon] || "edit" - field_name = assigns[:name] || :body - field_placeholder = assigns[:placeholder] || "Your message" - is_required = assigns[:required] @@ -11,7 +11,7 @@ = action_text a href="#" data-click-tab="preview" - i.fa.fa-cog.fa-fw.fa-spin.js-preview-loading.hidden> title=raw('Loading preview…') + i.fa.fa-cog.fa-fw.fa-spin.js-preview-loading.hidden> title=raw("Loading preview…") i.fa.fa-eye.fa-fw.js-preview-idle> | Preview diff --git a/lib/philomena_web/templates/profile/commission/_form.html.slime b/lib/philomena_web/templates/profile/commission/_form.html.slime index ac2e286b..1936edf1 100644 --- a/lib/philomena_web/templates/profile/commission/_form.html.slime +++ b/lib/philomena_web/templates/profile/commission/_form.html.slime @@ -23,7 +23,7 @@ .field => label f, :categories, "Art Categories:" br - = collection_checkboxes f, :categories, categories(), selected: f.data.categories, input_opts: [ class: 'checkbox spacing-right' ], wrapper: &Phoenix.HTML.Tag.content_tag(:span, &1, class: "commission__category") + = collection_checkboxes f, :categories, categories(), selected: f.data.categories, input_opts: [ class: "checkbox spacing-right" ], wrapper: &Phoenix.HTML.Tag.content_tag(:span, &1, class: "commission__category") = error_tag f, :categories .field => label f, :sheet_image_id, "Image ID of your commissions sheet (optional but recommended):"