skip policy scope if redirecting an explore page

This commit is contained in:
Devin Howard 2016-06-20 08:24:29 +08:00
parent 6028942fb8
commit dd02d221d4

View file

@ -39,7 +39,10 @@ class MapsController < ApplicationController
# GET /explore/mine
def mymaps
return redirect_to explore_active_path if !authenticated?
if !authenticated?
skip_policy_scope
return redirect_to explore_active_path
end
page = params[:page].present? ? params[:page] : 1
@maps = policy_scope(
@ -54,7 +57,10 @@ class MapsController < ApplicationController
# GET /explore/shared
def sharedmaps
return redirect_to activemaps_url if !authenticated?
if !authenticated?
skip_policy_scope
return redirect_to activemaps_url
end
page = params[:page].present? ? params[:page] : 1
@maps = policy_scope(