skip policy scope if redirecting an explore page
This commit is contained in:
parent
6028942fb8
commit
dd02d221d4
1 changed files with 8 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue