deprecated model error pattern

This commit is contained in:
Jeffrey Martin
2021-05-24 15:12:39 -05:00
parent 1fe26b8c6c
commit ff088c67ce
2 changed files with 2 additions and 2 deletions
@@ -7,7 +7,7 @@ module Metasploit
def validate_each(record, attribute, value)
unless ::File.executable? value
record.errors[attribute] << (options[:message] || "is not a valid path to an executable file")
record.errors.add(attribute, (options[:message] || "is not a valid path to an executable file"))
end
end
end
@@ -7,7 +7,7 @@ module Metasploit
def validate_each(record, attribute, value)
unless value && ::File.file?(value)
record.errors[attribute] << (options[:message] || "is not a valid path to a regular file")
record.errors.add(attribute, (options[:message] || "is not a valid path to a regular file"))
end
end
end