Skip to content

Commit

Permalink
Reverting rubocop styles to pass the tests initially
Browse files Browse the repository at this point in the history
  • Loading branch information
dasunpubudumal committed Mar 11, 2024
1 parent 0efecda commit 8193151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/api/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 8193151

Please sign in to comment.