Skip to content

Instantly share code, notes, and snippets.

@axilaris
Created May 18, 2014 03:36
Show Gist options
  • Select an option

  • Save axilaris/07613db0cfaac9581ecf to your computer and use it in GitHub Desktop.

Select an option

Save axilaris/07613db0cfaac9581ecf to your computer and use it in GitHub Desktop.
this doesnt work: (only takes in payment_total but not the rest)
retval = @invoice.update(:payment_total => 20, :due_amount => 10, :data => clonedata)
this works:
retval = Invoice.where(:id => @invoice.id).update_all(:payment_total => 20,
:due_amount => 10,
:data => clonedata.to_json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment