16 ms·
[] is truthy in Ruby but there is #empty? on collection types. Rails also has #blank? which additionally works on false and nil.
by dschooh 5y ago
[] is truthy in Ruby but there is #empty? on collection types. Rails also has #blank? which additionally works on false and nil.