mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
14 lines
No EOL
372 B
Ruby
14 lines
No EOL
372 B
Ruby
namespace :contacts do
|
|
desc 'Archives inactive contacts'
|
|
|
|
task archive: :environment do
|
|
inactive_contacts = InactiveContacts.new
|
|
archived_contacts = inactive_contacts.archive
|
|
|
|
archived_contacts.each do |contact|
|
|
puts "Contact ##{contact.id} (code: #{contact.code}) is archived"
|
|
end
|
|
|
|
puts "Archived total: #{archived_contacts.count}"
|
|
end
|
|
end |