class
Person < ApplicationRecord
validates
:surname
, presence:
true
,
if
:
"name.nil?"
end
How do I change the if: condition to name not nil?