what is the need for using unless and "?" together when you can use if like in this case
unless person.present?
is equivalent to
if person.present
They're not equivalent.
doSomeThing() unless person.present?
will execute only if person.present is null
doSomeThing() unless person.present
will execute if person.present is a false value
doSomeThing() if person.present
will execute if person.present is a true value
check the compiled javascript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With