Ember temp commit

This commit is contained in:
2013-09-24 08:47:30 +02:00
parent ebbb5dedfc
commit 5650ada04c
71 changed files with 595 additions and 66 deletions
@@ -0,0 +1,18 @@
module Suppliers
class OrdersController < Suppliers::ApplicationController
# GET /tables
# GET /tables.json
def index
if params[:state] == 'active'
@orders = Order.active_for_supplier(current_supplier.id)
else
@orders = Order.for_supplier(current_supplier, page: params[:page], per_page: params['per_page'] || 10)
end
respond_to do |format|
format.html # index.html.erb
format.json { render json: {orders: @orders.map(&:with_products_as_json)} }
end
end
end
end