20170822000001_agend_based_sender_issue_1351.rb 395 B

123456789101112131415
  1. class AgendBasedSenderIssue1351 < ActiveRecord::Migration[4.2]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. EmailAddress.all.each do |email_address|
  6. email_address.save!
  7. rescue => e
  8. Rails.logger.error "Unable to update EmailAddress.find(#{email_address.id}) '#{email_address.inspect}': #{e.message}"
  9. end
  10. end
  11. end