Skip to content
Snippets Groups Projects
Commit 89982376 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

Update response 'X-total-count' in header of learning_objects controller

parent 774ecded
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ class V1::LearningObjectsController < ApplicationController
limit = params[:limit] || 10
offset = params[:offset] || 0
serializer = params[:obaa].nil? ? LearningObjectSerializer : LearningObjectObaaSerializer
response.headers['X-Total-Count'] = LearningObject.count
headers['X-Total-Count'] = LearningObject.count
render json: LearningObject.includes(:tags, :publisher, :language, :license).limit(limit).offset(offset), each_serializer: serializer
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment