fix policy scope error (#941)
This commit is contained in:
parent
3f161c1076
commit
d1aa62d382
1 changed files with 1 additions and 0 deletions
|
@ -70,6 +70,7 @@ class SearchController < ApplicationController
|
||||||
builder = builder.where(user: user) if user
|
builder = builder.where(user: user) if user
|
||||||
@topics = builder.order(:name)
|
@topics = builder.order(:name)
|
||||||
else
|
else
|
||||||
|
skip_policy_scope
|
||||||
@topics = []
|
@topics = []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue