Use #none? instead of inverting #all?

This commit is contained in:
Gabe Berke-Williams 2012-03-23 15:10:33 -04:00
parent 31b140f530
commit c10cf343ae
1 changed files with 2 additions and 2 deletions

View File

@ -43,10 +43,10 @@ module Shoulda # :nodoc:
def matches?(instance)
@instance = instance
@values_to_match.all? do |value|
@values_to_match.none? do |value|
@value = value
@instance.send("#{@attribute}=", @value)
! errors_match?
errors_match?
end
end