Files
mozo-backend/app/controllers/users/lists_controller.rb
T
2014-03-26 17:48:54 +01:00

13 lines
496 B
Ruby

module Users
class ListsController < Users::ApplicationController
#EMBER
def current
list = current_user.active_list
render json: json_response(not_present: true) and return unless list.present?
render json: {
list: list.serialized_with_status_join_requests_and_supplier_counters,
}.merge(ActiveModel::ArraySerializer.new(list.supplier.product_categories, each_serializer: ProductCategorySerializer, root: :product_categories).as_json)
end
end
end