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
|
# GET /explore/active
|
||||||
def 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|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
|
|
|
@ -8,7 +8,7 @@ class MainController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
if authenticated?
|
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)
|
.order(updated_at: :desc).page(1).per(20)
|
||||||
render 'explore/active'
|
render 'explore/active'
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue