From 6e8a2f5754a87951f913d26edacc4274ca60e285 Mon Sep 17 00:00:00 2001 From: Adrian Hirt Date: Sun, 23 Jun 2024 20:38:46 +0200 Subject: [PATCH] Comply with haml-lint --- .rubocop.yml | 5 +++++ app/views/admin/home/dashboard.html.haml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index eb9b9710..82ab3af5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -115,6 +115,11 @@ Naming/VariableNumber: Exclude: - 'app/views/**/*' +Layout/SpaceInsideParens: + # This cop seems broken for multiline hashes in HAML + Exclude: + - 'app/views/**/*' + Style/IfUnlessModifier: # Disable this cop in the haml files Exclude: diff --git a/app/views/admin/home/dashboard.html.haml b/app/views/admin/home/dashboard.html.haml index ea1a8f29..1625e8a4 100644 --- a/app/views/admin/home/dashboard.html.haml +++ b/app/views/admin/home/dashboard.html.haml @@ -19,4 +19,4 @@ .text-white.bg-info.p-2 = icon %i[fas fa-fw fa-user-clock] .text-muted.fw-normal.mt-0= _('Admin|Shop|New users in the last week') - %h3.mt-3.mb-3= User.where('created_at >= ?', 7.days.ago).count + %h3.mt-3.mb-3= User.where(created_at: 7.days.ago..).count