diff --git a/lib/pundit/policy_finder.rb b/lib/pundit/policy_finder.rb index a3c4d42..8e2bfe8 100644 --- a/lib/pundit/policy_finder.rb +++ b/lib/pundit/policy_finder.rb @@ -33,7 +33,7 @@ module Pundit private def find - if object.blank? + if object.nil? nil elsif object.respond_to?(:policy_class) object.policy_class diff --git a/spec/pundit_spec.rb b/spec/pundit_spec.rb index bb09137..5f39728 100644 --- a/spec/pundit_spec.rb +++ b/spec/pundit_spec.rb @@ -39,7 +39,7 @@ describe Pundit do expect(Pundit.policy_scope(user, Comment)).to eq Comment end - it "returns an instantiated policy scope given an active record relation", focus: true do + it "returns an instantiated policy scope given an active record relation" do expect(Pundit.policy_scope(user, comments_relation)).to eq comments_relation end