Fix bug with unlinking user orders on lists load over active list

This commit is contained in:
2014-08-11 13:40:20 +02:00
parent af45377679
commit 28192f8e39
18 changed files with 66 additions and 62 deletions
@@ -5,6 +5,7 @@ module Users
#lists = current_user.lists.include_relation(:supplier, :table)
lists = List.for_user(current_user, page: params[:page], per_page: params[:per_page].presence || 25).include_relation(:supplier, :table)
#lists.include_relation(:supplier)
lists.include_relation(:users, :orders)
render json: lists, each_serializer: UserListSerializer, meta: {total_pages: lists.total_pages, page: lists.current_page} #, root: :lists
end