Last active
November 29, 2017 14:22
-
-
Save paulodiniz/dc94c89bf03ee31bc343538741c0e3ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddTypeToBoleto < ActiveRecord::Migration[5.1] | |
class Boleto < ApplicationRecord; end | |
def change | |
add_column :boletos, :type, :string | |
Boleto.find_each do |boleto| | |
boleto.type = 'boleto_bancario' | |
boleto.save! | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment