From 5cfd60db24e54a7a6ec1f216dc6c697d82deb2be Mon Sep 17 00:00:00 2001
From: Giovanne Marcelo <gms15@inf.ufpr.br>
Date: Sun, 13 Mar 2016 19:30:46 -0300
Subject: [PATCH] Small fix

---
 app/controllers/collections_controller.rb | 3 ++-
 app/controllers/users_controller.rb       | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/controllers/collections_controller.rb b/app/controllers/collections_controller.rb
index e94d2d77..2a66e1dc 100644
--- a/app/controllers/collections_controller.rb
+++ b/app/controllers/collections_controller.rb
@@ -121,10 +121,11 @@ class CollectionsController < ApplicationController
 
     @groups = [
         CollectionsGroup.new(title: 'Coleções Automáticas',
-                             collections: [current_user.bookmarks]),
+                             collections: [current_user.bookmarks.first]),
         CollectionsGroup.new(title: 'Coleções Adicionadas',
                              collections: current_user.collections)
     ]
+
   end
 
   # POST /collections/1/learning_object
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 0a2504fe..e721429a 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -13,7 +13,7 @@ class UsersController < ApplicationController
 
     if @user == current_user
       @publishers = @user.institutions
-      @bookmarks = @user.bookmarks
+      @bookmarks = @user.bookmarks.first
       @groups.unshift(CollectionsGroup.new(title: 'Coleções Automáticas', collections: [@bookmarks]))
     end
   end
-- 
GitLab