Class: Comable::OrdersController

Inherits:
ApplicationController show all
Includes:
PaymentAction, ShipmentAction
Defined in:
app/controllers/comable/orders_controller.rb

Instance Method Summary collapse

Methods included from ShipmentAction

#shipment

Methods included from PaymentAction

#payment

Instance Method Details

#confirmObject



31
32
# File 'app/controllers/comable/orders_controller.rb', line 31

def confirm
end

#createObject



34
35
36
37
38
39
40
41
42
43
# File 'app/controllers/comable/orders_controller.rb', line 34

def create
  order = current_customer.order
  if order.complete?
    Comable::OrderMailer.complete(order).deliver if current_store.email_activate?
    flash[:notice] = I18n.t('comable.orders.success')
  else
    flash[:alert] = I18n.t('comable.orders.failure')
    redirect_to comable.confirm_order_path
  end
end

#deliveryObject



24
25
26
27
28
29
# File 'app/controllers/comable/orders_controller.rb', line 24

def delivery
  case request.method_symbol
  when :post
    redirect_to next_order_path
  end
end

#newObject



14
15
# File 'app/controllers/comable/orders_controller.rb', line 14

def new
end

#ordererObject



17
18
19
20
21
22
# File 'app/controllers/comable/orders_controller.rb', line 17

def orderer
  case request.method_symbol
  when :post
    redirect_to comable.delivery_order_path
  end
end