Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created April 21, 2012 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsavkin/2432877 to your computer and use it in GitHub Desktop.
Save vsavkin/2432877 to your computer and use it in GitHub Desktop.
Create Order with Items
buyer = current_user
order = Order.make buyer
#At this moment:
#order.shipping_address == buyers_address
#order.status == :new
order.make_item book1, 2
order.make_item book2, 3
order.mark_as_ready
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment