fix policy scope error (#941)

This commit is contained in:
Devin Howard 2016-11-30 11:46:09 -05:00 committed by GitHub
parent 3f161c1076
commit d1aa62d382

View file

@ -70,6 +70,7 @@ class SearchController < ApplicationController
builder = builder.where(user: user) if user
@topics = builder.order(:name)
else
skip_policy_scope
@topics = []
end