From fce7db8553a8f5955a4147a9639da7433670862f Mon Sep 17 00:00:00 2001 From: Daniel Uber Date: Wed, 18 Aug 2021 08:21:48 -0500 Subject: [PATCH] Fix erblint failures (#14532) * erblint was failing on this file, it looks like two separate issues a closing quote on the `aria-haspopup="true caused some issues when running erblint a warning about Lint/FloatComparison raised about casting the rating_level value to_f, I chose to convert the float to integer and compare to the value instead. I suspect the lint rule didn't run in the most recent change to this file. * Use `round` instead of `to_i` when converting from float Also, move the access and conversion outside of the loop (microoptimization, but I did it to shorten the inline comparison). --- app/views/moderations/actions_panel.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/moderations/actions_panel.html.erb b/app/views/moderations/actions_panel.html.erb index 229b19c34..cc9334abf 100644 --- a/app/views/moderations/actions_panel.html.erb +++ b/app/views/moderations/actions_panel.html.erb @@ -1,4 +1,4 @@ -<% title "Moderating " + @moderatable.title %> +<% title "Moderating #{@moderatable.title}" %> <% cache(release_adjusted_cache_key("mod-styling")) do %>