cirandas.net

ref: master

db/migrate/20140718134638_remove_enterprise_activation_for_invisible_enterprises.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class RemoveEnterpriseActivationForInvisibleEnterprises < ActiveRecord::Migration

  def self.up
    Enterprise.invisible.find_each do |enterprise|
      next unless enterprise.activation_task
      enterprise.activation_task.destroy
    end
  end

end