Skip to content
Snippets Groups Projects
Commit 698d1afa authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

change method args for collection_repository.all in User model

parent 5fb4e9f9
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ class User < ActiveRecord::Base
validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/
def collections
collection_repository.all self
collection_repository.all Collections::UserPrivateContext.new(self)
end
def bookmarks
......
......@@ -48,7 +48,6 @@ module OrientDb
##
# Select all collections in context
def all(context = Collections::PublicContext.new)
#query = sprintf("select * from (select expand(in('BelongsTo')) from %s) where name<>'Bookmarks' and privacy = '%s'", user.rid)
query = sprintf("select * from %s where name<>'Bookmarks' and privacy = '%s'", context.from, context.privacy)
build_objects connection.query(query)
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