From 19b7bdc4b21fced8ddb979fb3b70775b5e876611 Mon Sep 17 00:00:00 2001
From: Mauricio Giacomini Girardello <mauriciogiacomini4@gmail.com>
Date: Wed, 11 Nov 2015 13:44:42 -0200
Subject: [PATCH] fix User#collections method to return all collections

---
 app/models/user.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/models/user.rb b/app/models/user.rb
index 2a254ec4..d26e9335 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -35,7 +35,9 @@ class User < ActiveRecord::Base
   validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/
 
   def collections
-    collection_repository.all Collections::UserPrivateContext.new(self)
+    public_collections = collection_repository.all(Collections::UserPublicContext.new(self))
+    private_collections = collection_repository.all(Collections::UserPrivateContext.new(self))
+    @collections = public_collections + private_collections
   end
 
   def institutions
-- 
GitLab