Files
nairobi/lib/tasks/map_locations.rake
2019-03-15 10:29:07 +01:00

9 lines
263 B
Ruby

namespace :map_locations do
desc "Destroy all empty MapLocation instances found in the database"
task destroy: :environment do
MapLocation.where(longitude: nil, latitude: nil, zoom: nil).each do |map_location|
map_location.destroy
end
end
end