module Users
  class ProductCategoriesController < Users::ApplicationController
    #EMBER
    def index
      render json: {} and return unless params[:table_id].present?
      table = Table.find(params[:table_id])
      product_categories = table.supplier.product_categories.include_relation('products') # not yet implemented for many to many
      render json: product_categories #, serializer: ProductCategorySerializer
    end
  end
end
