instance method
allow_nil?
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
allow_nil?(record)
No documentation comment.
Parameters
-
recordreq
Source
# File activemodel/lib/active_model/validator.rb, line 176
def allow_nil?(record)
if options[:allow_nil].respond_to?(:to_proc)
options[:allow_nil].to_proc.call(record)
else
options[:allow_nil]
end
end
Defined in activemodel/lib/active_model/validator.rb line 176
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::EachValidator