mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
parent
296442e330
commit
487613db1e
14 changed files with 424 additions and 84 deletions
14
app/models/inactive_contacts.rb
Normal file
14
app/models/inactive_contacts.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class InactiveContacts
|
||||
attr_reader :contacts
|
||||
|
||||
def initialize(contacts = Contact.archivable)
|
||||
@contacts = contacts
|
||||
end
|
||||
|
||||
def archive
|
||||
contacts.each do |contact|
|
||||
contact.archive
|
||||
yield contact if block_given?
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue