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)
|
||||
@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
|
||||
|
||||
|
|
Loading…
Reference in New Issue