# This module is supposed to be included into other model classes to define the
# scopes :pub and :accessible_by
included do
# access scopes
joins(:repository).
# simulating scope: repository.active
end
if user
joins(:repository).
# simulating scope: repository.active
else
end
end
end
end