Class: MechanizeStore::OrdersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- MechanizeStore::OrdersController
- Defined in:
- app/controllers/mechanize_store/orders_controller.rb
Instance Method Summary collapse
Instance Method Details
#fetch_collections ⇒ Object
9 10 11 12 |
# File 'app/controllers/mechanize_store/orders_controller.rb', line 9 def fetch_collections @order_statuses = Order.statuses_collection @payment_statuses = Payment.statuses_collection end |
#index ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/mechanize_store/orders_controller.rb', line 14 def index params[:q] ||= {} @search = Order.search(params[:q]) @orders = @search.result.paginate(page: params[:page]) respond_with @orders end |
#show ⇒ Object
24 25 26 27 |
# File 'app/controllers/mechanize_store/orders_controller.rb', line 24 def show @order = Order.find(params[:id]) respond_with @order end |