about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-21 19:54:36 -0500
committerGitHub <noreply@github.com>2023-02-22 09:54:36 +0900
commit0cfdd1a401f055c23e308a4b823bd250b1cbb3d3 (patch)
tree35cd9c386409bc9a1ca917bb6201b0ba1af37896 /app/lib
parent7ecf783dd3bfc07f80aab495273b6d01ba972c40 (diff)
Enable Rubocop Style/StringConcatenation defaults (#23792)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/case_transform.rb2
-rw-r--r--app/lib/validation_error_formatter.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/case_transform.rb b/app/lib/activitypub/case_transform.rb
index 7f716f862..d36e01b8f 100644
--- a/app/lib/activitypub/case_transform.rb
+++ b/app/lib/activitypub/case_transform.rb
@@ -13,7 +13,7 @@ module ActivityPub::CaseTransform
       when Symbol then camel_lower(value.to_s).to_sym
       when String
         camel_lower_cache[value] ||= if value.start_with?('_:')
-                                       '_:' + value.gsub(/\A_:/, '').underscore.camelize(:lower)
+                                       "_:#{value.gsub(/\A_:/, '').underscore.camelize(:lower)}"
                                      else
                                        value.underscore.camelize(:lower)
                                      end
diff --git a/app/lib/validation_error_formatter.rb b/app/lib/validation_error_formatter.rb
index 3f964f739..1d3e8955b 100644
--- a/app/lib/validation_error_formatter.rb
+++ b/app/lib/validation_error_formatter.rb
@@ -19,7 +19,7 @@ class ValidationErrorFormatter
       messages = errors.messages[attribute_name]
 
       h[@aliases[attribute_name] || attribute_name] = attribute_errors.map.with_index do |error, index|
-        { error: 'ERR_' + error[:error].to_s.upcase, description: messages[index] }
+        { error: "ERR_#{error[:error].to_s.upcase}", description: messages[index] }
       end
     end