Skip to content

Instantly share code, notes, and snippets.

@debborafernandess
Created July 24, 2019 21:23
Show Gist options
  • Save debborafernandess/4b87c6182c63c4600487c393ccaef056 to your computer and use it in GitHub Desktop.
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
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