Skip to content

Instantly share code, notes, and snippets.

@davidnorth
Created September 2, 2010 21:42
Show Gist options
  • Save davidnorth/563007 to your computer and use it in GitHub Desktop.
Save davidnorth/563007 to your computer and use it in GitHub Desktop.
?> a = Order.find(43).adjustments.first
=> #<Adjustment id: 7, order_id: 43, amount: #<BigDecimal:104cdf208,'0.25E1',8(8)>, label: "Shipping", created_at: "2010-09-02 19:23:06", updated_at: "2010-09-02 21:39:12", source_id: 11, source_type: "Shipment", mandatory: nil, frozen: nil, originator_id: 1, originator_type: "ShippingMethod">
?> a.originator_id
=> 1
>> a.originator_id = 3
=> 3
>> a.save!
=> true
>> a.reload
=> #<Adjustment id: 7, order_id: 43, amount: #<BigDecimal:104bd10c8,'0.25E1',8(8)>, label: "Shipping", created_at: "2010-09-02 19:23:06", updated_at: "2010-09-02 21:39:12", source_id: 11, source_type: "Shipment", mandatory: nil, frozen: nil, originator_id: 1, originator_type: "ShippingMethod">
>> a.originator_id
=> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment