mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
add migrating for dummy emails
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class AddDummyForMissingEmails < ActiveRecord::Migration
|
||||
def up
|
||||
Enterprise.all.each do |enterprise|
|
||||
enterprise.update_attributes({:email => "missing@example.com"}) if enterprise.read_attribute(:email).blank?
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user