Class: Comable::OrdersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Comable::OrdersController
- Includes:
- Decoratable
- Defined in:
- app/controllers/comable/orders_controller.rb
Instance Method Summary collapse
- #confirm ⇒ Object
- #create ⇒ Object
- #delivery ⇒ Object
- #new ⇒ Object
- #orderer ⇒ Object
- #payment ⇒ Object
Methods included from Decoratable
Methods included from ApplicationHelper
Instance Method Details
#confirm ⇒ Object
37 38 |
# File 'app/controllers/comable/orders_controller.rb', line 37 def confirm end |
#create ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'app/controllers/comable/orders_controller.rb', line 40 def create order = current_customer.order if order.complete? 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
23 24 25 26 27 28 |
# File 'app/controllers/comable/orders_controller.rb', line 23 def delivery case request.method_symbol when :post redirect_to comable.payment_order_path end end |
#new ⇒ Object
13 14 |
# File 'app/controllers/comable/orders_controller.rb', line 13 def new end |
#orderer ⇒ Object
16 17 18 19 20 21 |
# File 'app/controllers/comable/orders_controller.rb', line 16 def orderer case request.method_symbol when :post redirect_to comable.delivery_order_path end end |
#payment ⇒ Object
30 31 32 33 34 35 |
# File 'app/controllers/comable/orders_controller.rb', line 30 def payment case request.method_symbol when :post redirect_to comable.confirm_order_path end end |