dont show private maps in global collection (#734)
* dont show private maps in global collection * Update explore_controller.rb * Update main_controller.rb
This commit is contained in:
parent
97d2868fad
commit
86a6e92bc3
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue