cartodb-4.42/app/models/carto/data_import_constants.rb
2024-04-06 05:25:13 +00:00

15 lines
446 B
Ruby

module Carto
module DataImportConstants
COLLISION_STRATEGY_SKIP = 'skip'.freeze
COLLISION_STRATEGY_OVERWRITE = 'overwrite'.freeze
VALID_COLLISION_STRATEGIES = [COLLISION_STRATEGY_SKIP, COLLISION_STRATEGY_OVERWRITE, nil].freeze
def validate_collision_strategy
unless VALID_COLLISION_STRATEGIES.include?(collision_strategy)
errors.add(:collision_strategy, "Invalid collision strategy")
end
end
end
end