Sha256: 2d69e9288336d9789050c19047f662257c0cc55b0d023c855f1318aa2b02e9c4

Contents?: true

Size: 233 Bytes

Versions: 4

Compression:

Stored size: 233 Bytes

Contents

class EnsurePaymentsHaveNumbers < ActiveRecord::Migration
  def change
    Spree::Payment.where(number: nil).find_each do |payment|
      payment.generate_number
      payment.update_columns(number: payment.number)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_core-3.0.4 db/migrate/20150309161154_ensure_payments_have_numbers.rb
spree_core-3.0.3 db/migrate/20150309161154_ensure_payments_have_numbers.rb
spree_core-3.0.2 db/migrate/20150309161154_ensure_payments_have_numbers.rb
spree_core-3.0.1 db/migrate/20150309161154_ensure_payments_have_numbers.rb