Skip to content

Instantly share code, notes, and snippets.

@debborafernandess
Created July 24, 2019 21:23
Show Gist options
  • Select an option

  • Save debborafernandess/4b87c6182c63c4600487c393ccaef056 to your computer and use it in GitHub Desktop.

Select an option

Save debborafernandess/4b87c6182c63c4600487c393ccaef056 to your computer and use it in GitHub Desktop.

Revisions

  1. debborafernandess created this gist Jul 24, 2019.
    10 changes: 10 additions & 0 deletions bulk_lancar_plano_nos.rb
    Original 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