Use #none? instead of inverting #all?
This commit is contained in:
parent
31b140f530
commit
c10cf343ae
|
@ -43,10 +43,10 @@ module Shoulda # :nodoc:
|
||||||
|
|
||||||
def matches?(instance)
|
def matches?(instance)
|
||||||
@instance = instance
|
@instance = instance
|
||||||
@values_to_match.all? do |value|
|
@values_to_match.none? do |value|
|
||||||
@value = value
|
@value = value
|
||||||
@instance.send("#{@attribute}=", @value)
|
@instance.send("#{@attribute}=", @value)
|
||||||
! errors_match?
|
errors_match?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue