From 18d8778b213e131d18c57262e11a628978c50f4d Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:03:44 +0000 Subject: [PATCH 1/2] Update rubocop-rails to version 2.25.1 --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0202f010..c2eda96b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -155,7 +155,7 @@ GEM mini_portile2 (~> 2.8.2) racc (~> 1.4) parallel (1.25.1) - parser (3.3.3.0) + parser (3.3.4.0) ast (~> 2.4.1) racc pry (0.14.2) @@ -205,7 +205,7 @@ GEM rdoc (6.6.3.1) psych (>= 4.0.0) regexp_parser (2.9.2) - rexml (3.3.1) + rexml (3.3.2) strscan rspec-collection_matchers (1.2.1) rspec-expectations (>= 2.99.0.beta1) @@ -226,13 +226,13 @@ GEM rspec-mocks (~> 3.5.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) - rubocop (1.64.1) + rubocop (1.65.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) + regexp_parser (>= 2.4, < 3.0) rexml (>= 3.2.5, < 4.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) @@ -246,7 +246,7 @@ GEM rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.24.1) + rubocop-rails (2.25.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) From c9a52789b928624248a2ceb4608433b22d1df56c Mon Sep 17 00:00:00 2001 From: Stephen <519327+stevieing@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:00:16 +0100 Subject: [PATCH 2/2] chore: Refactor validationErrorMsg method to use early return --- lib/client_side_validations.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/client_side_validations.rb b/lib/client_side_validations.rb index 16eda92b..ea372dca 100644 --- a/lib/client_side_validations.rb +++ b/lib/client_side_validations.rb @@ -21,7 +21,8 @@ def html_validation_attributes(attr_name) end def validationErrorMsg(attr_name) - nil if @regexp[attr_name].nil? + return if @regexp[attr_name].nil? + @regexp[attr_name][:error_msg] end