dont show private maps in global collection

This commit is contained in:
Connor Turland 2016-10-06 11:22:09 -04:00
parent 97d2868fad
commit c0f89e6010
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class ExploreController < ApplicationController
# GET /explore/active
def active
@maps = map_scope(Map.where.not(name: 'Untitled Map'))
@maps = map_scope(Map.where.not(name: 'Untitled Map').where.not(permission: 'Private'))
respond_to do |format|
format.html do

View file

@ -8,7 +8,7 @@ class MainController < ApplicationController
respond_to do |format|
format.html do
if authenticated?
@maps = policy_scope(Map).where.not(name: 'Untitled Map')
@maps = policy_scope(Map).where.not(name: 'Untitled Map').where.not(permission: 'Private')
.order(updated_at: :desc).page(1).per(20)
render 'explore/active'
else