From 7138f5588ee615984b582d0ac49888a5c4e65e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Calzado?= Date: Thu, 23 Dec 2021 10:53:02 +0100 Subject: [PATCH] Fix more rubocop offenses --- app/mailers/reporter_mailer.rb | 2 +- lib/carto/named_maps/api.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/mailers/reporter_mailer.rb b/app/mailers/reporter_mailer.rb index 2c05204206..0067cc9f3b 100644 --- a/app/mailers/reporter_mailer.rb +++ b/app/mailers/reporter_mailer.rb @@ -11,7 +11,7 @@ class ReporterMailer < ActionMailer::Base def named_maps_near_the_limit(message) mail_to = Cartodb.get_config(:mailer, 'support_email') - + mail to: mail_to, subject: message if mail_to end end diff --git a/lib/carto/named_maps/api.rb b/lib/carto/named_maps/api.rb index 70ea4a5764..4867216450 100644 --- a/lib/carto/named_maps/api.rb +++ b/lib/carto/named_maps/api.rb @@ -50,8 +50,8 @@ module Carto # Send message to support and clean some named_maps ReporterMailer.named_maps_near_the_limit(response_body[:limit_message]).deliver_now tables = Carto::UserTable.where(user_id: user.id, privacy: 0) - .limit(MAX_NAMED_MAPS_TO_CLEAN) - .order('updated_at') + .limit(MAX_NAMED_MAPS_TO_CLEAN) + .order('updated_at') named_maps_ids = tables.map { |t| "tpl_#{t.visualization.id.tr('-', '_')}" } urls = named_maps_ids.map { |id| url(template_name: id) } ::Resque.enqueue(