nitter
Aaron Parecki
@aaronpk
24 Dec 2012
Dear Ruby people, is there any reason I should not do this:
aaronparecki.com/notes/2012/…
Dec 24, 2012 · 1:17 AM UTC
5
1
Bryan Stearns ‽
@bryanstearns
24 Dec 2012
Replying to
@aaronpk
@aaronpk
Rails adds
#blank
? to do this; see
guides.rubyonrails.org/activ…
['', nil, [], {}, false].all(&:blank?) #=> true
Patrick Arlt
@patrickarlt
24 Dec 2012
Replying to
@aaronpk
@aaronpk
I lifted this code form somewhere awhile ago. It adds a blank? method which is like nil? or empty?.
raw.github.com/patrickarlt/A…
This tweet is unavailable
Aaron Parecki
@aaronpk
24 Dec 2012
@kenkeiter
DataMapper returns `nil` when it doesn't return a record. That's my primary use case. Why is that wrong?
3