Created
July 24, 2019 21:23
-
-
Save debborafernandess/4b87c6182c63c4600487c393ccaef056 to your computer and use it in GitHub Desktop.
Revisions
-
debborafernandess created this gist
Jul 24, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ 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