Class: Admin::ShipmentsController

Inherits:
AdminController
  • Object
show all
Defined in:
app/controllers/admin/shipments_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/admin/shipments_controller.rb', line 5

def create
  @shipment = @order.shipments.build params[:shipment]

  respond_to do |format|
    format.html do
      if @shipment.save
        @order.shipped
        redirect_to admin_order_path(@order)
      end
    end
  end
end