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
#confirm ⇒ Object
31 32 |
# File 'app/controllers/comable/orders_controller.rb', line 31 def confirm end |
#create ⇒ Object
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 |
#delivery ⇒ Object
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 |
#new ⇒ Object
14 15 |
# File 'app/controllers/comable/orders_controller.rb', line 14 def new end |
#orderer ⇒ Object
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 |