Skip to content
Snippets Groups Projects
Commit 963b40ea authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Removed drafts from learning_objects index

parent 48873f38
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ class V1::LearningObjectsController < ApplicationController
before_action :set_paper_trail_whodunnit, except: [:index, :show]
def index
learning_objects = paginate LearningObject.includes(:tags, :publisher, :language, :license, :subjects, :educational_stages, :reviews)
learning_objects = paginate policy_scope(LearningObject).includes(:tags, :publisher, :language, :license, :subjects, :educational_stages, :reviews).order(created_at: :desc)
serializer = params[:obaa].nil? ? LearningObjectSerializer : LearningObjectObaaSerializer
http_cache_forever do
render json: learning_objects, each_serializer: serializer
......
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