Created
July 24, 2019 21:23
-
-
Save debborafernandess/4b87c6182c63c4600487c393ccaef056 to your computer and use it in GitHub Desktop.
Lançar plano para um array de clientes, para chama-los de volta à unidade
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
people = [Person.where(id: [3, 4])] | |
plan = Plan.find(18) | |
people.each do |person| | |
purchase = person.purchases.last.dup | |
purchase.microgym = 'nos' | |
purchase.description = 'Chamar quem se inscreveu e nunca compareceu' | |
purchase.plan_id = plan.id | |
purchase.save | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment