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

Merge branch 'master' into show-public-collections

parents 35a20fb5 171e7bc9
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,12 @@ class V1::LearningObjectsController < ApplicationController ...@@ -76,7 +76,12 @@ class V1::LearningObjectsController < ApplicationController
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
def set_learning_object def set_learning_object
@learning_object ||= LearningObject.unscoped.find(params[:id]) #check if user is admin to show destroyed object
if current_user.try(:is_admin?)
@learning_object ||= LearningObject.unscoped.find(params[:id])
else
@learning_object ||= LearningObject.find(params[:id])
end
end end
def set_new_learning_object def set_new_learning_object
......
...@@ -20,7 +20,7 @@ class CollectionSerializer < ActiveModel::Serializer ...@@ -20,7 +20,7 @@ class CollectionSerializer < ActiveModel::Serializer
def items_thumbnails def items_thumbnails
thumbs = [] thumbs = []
i = 0 i = 0
while thumbs.size < 4 && i < object.collection_items.size do while thumbs.size < 6 && i < object.collection_items.size do
t = object.collection_items[i].thumbnail t = object.collection_items[i].thumbnail
thumbs << t unless t.blank? thumbs << t unless t.blank?
i=i+1 i=i+1
......
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