From a8e4e1095d2a3953e4028e53a04c263c486f009b Mon Sep 17 00:00:00 2001 From: Prommah Date: Wed, 4 Nov 2015 14:26:32 +0000 Subject: [PATCH] Clean up Verification.contain --- lib/verification.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/verification.rb b/lib/verification.rb index 5b70264..ebab58c 100755 --- a/lib/verification.rb +++ b/lib/verification.rb @@ -56,9 +56,6 @@ module Verification # TODO: rikki? # Returns true if params (or its keys) are a subset of filter def self.contain(params, filter) - (params.instance_of?(Array) ? params : params.keys).each do |key| - return false unless filter.include? key.to_sym - end - true + ((params.instance_of?(Array) ? params : params.keys) - filter).empty? end end