Rename method call to not shadow variable name

This commit is contained in:
Eugene Burmakin 2025-10-07 22:10:48 +02:00
parent 20d0ed8ec6
commit cde5af7c24

View file

@ -168,7 +168,7 @@ class Users::ImportData
when 'trips' when 'trips'
import_trips(value) import_trips(value)
when 'stats' when 'stats'
import_stats(value) import_stats_section(value)
when 'notifications' when 'notifications'
import_notifications(value) import_notifications(value)
else else
@ -324,7 +324,7 @@ class Users::ImportData
@import_stats[:trips_created] += trips_created @import_stats[:trips_created] += trips_created
end end
def import_stats(stats_data) def import_stats_section(stats_data)
Rails.logger.debug "Importing #{stats_data&.size || 0} stats" Rails.logger.debug "Importing #{stats_data&.size || 0} stats"
stats_created = Users::ImportData::Stats.new(user, stats_data).call.to_i stats_created = Users::ImportData::Stats.new(user, stats_data).call.to_i
@import_stats[:stats_created] += stats_created @import_stats[:stats_created] += stats_created