I'm passing service_type
through jade. Trying to compile with service_type = 'gas'
.
I tried:
- if(#{service_type}=='gas')
p gas
I've also tried:
- if('#{service_type}'=='gas')
p gas
but neither work... How can I check two strings are equals?
I got it working correctly without the {}
-if(service_type=='gas')
p gas
You actually also don't need the initial hyphen at the beginning.
if (service_type=='gas')
p gas
The above should work just fine also.
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