From 81931513e8448097e2331b0fd62d9d0904a6e5b8 Mon Sep 17 00:00:00 2001 From: Dasun Pubudumal Date: Mon, 11 Mar 2024 14:31:22 +0000 Subject: [PATCH] Reverting rubocop styles to pass the tests initially --- app/models/api/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/api/base.rb b/app/models/api/base.rb index 7eacdf5a5f..ceca13d757 100644 --- a/app/models/api/base.rb +++ b/app/models/api/base.rb @@ -52,14 +52,14 @@ def to_hash(object) # rubocop:todo Metrics/CyclomaticComplexity attribute_to_json_attribute_mappings.each do |attribute, json_attribute| json_attributes[json_attribute] = object.send(attribute) end - associations.each_key do |helper| + associations.each do |_association, helper| value = helper.target(object) json_attributes.update(helper.to_hash(value)) helper.newer_than(value, json_attributes['updated_at']) do |timestamp| json_attributes['updated_at'] = timestamp end end - nested_has_many_associations.each_key do |helper| + nested_has_many_associations.each do |_association, helper| values = helper.target(object) all_targets = values.map do |value|