Skip to content

Commit

Permalink
Fix CC issues
Browse files Browse the repository at this point in the history
  • Loading branch information
karlerikounapuu committed Sep 4, 2020
1 parent 5c7e07d commit c91b913
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/models/concerns/contact/archivable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def archive(verified: false, notify: true)
def notify_registrar_about_archivation
registrar.notifications.create!(
text: I18n.t('contact_has_been_archived',
contact_code: code, orphan_months: Setting.orphans_contacts_in_months))
contact_code: code, orphan_months: Setting.orphans_contacts_in_months)
)
end

def inactive?
Expand All @@ -48,7 +49,7 @@ def inactivity_period

def log(msg)
@log ||= Logger.new(STDOUT)
@log.info(msg)
Rails.env.test? ? puts(msg) : @log.info(msg)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/inactive_contacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ def archive(verified: false)

def log(msg)
@log ||= Logger.new(STDOUT)
@log.info(msg)
Rails.env.test? ? puts(msg) : @log.info(msg)
end
end
2 changes: 1 addition & 1 deletion lib/tasks/contacts/archive.rake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ namespace :contacts do

def log(msg)
@log ||= Logger.new(STDOUT)
@log.info(msg)
Rails.env.test? ? puts(msg) : @log.info(msg)
end
end

0 comments on commit c91b913

Please sign in to comment.