Class: Comable::OrdersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Comable::OrdersController
- Includes:
- PaymentAction, ShipmentAction
- Defined in:
- app/controllers/comable/orders_controller.rb
Instance Method Summary collapse
Methods included from ShipmentAction
Methods included from PaymentAction
Instance Method Details
#create ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'app/controllers/comable/orders_controller.rb', line 26 def create order = current_customer.order if order.complete? flash[:notice] = I18n.t('comable.orders.success') send_order_complete_mail else flash[:alert] = I18n.t('comable.orders.failure') redirect_to comable.confirm_order_path end end |
#delivery ⇒ Object
19 20 21 22 23 24 |
# File 'app/controllers/comable/orders_controller.rb', line 19 def delivery case request.method_symbol when :post redirect_to next_order_path end end |
#orderer ⇒ Object
12 13 14 15 16 17 |
# File 'app/controllers/comable/orders_controller.rb', line 12 def orderer case request.method_symbol when :post redirect_to comable.delivery_order_path end end |