Class: TbCommerce::Api::OrdersController
- Inherits:
-
BaseController
- Object
- Spud::ApplicationController
- TbCommerce::ApplicationController
- BaseController
- TbCommerce::Api::OrdersController
- Defined in:
- app/controllers/tb_commerce/api/orders_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
3 4 5 6 7 8 |
# File 'app/controllers/tb_commerce/api/orders_controller.rb', line 3 def create @order = TbCommerce::Order.find_or_initialize_by(:cart => tb_commerce_current_cart()) @order.assign_attributes(order_params) @order.save() respond_with @order end |