Joined September 2013
·

Rafał Cieślak

Software Developer at Estimote
·
Krakow, Poland
·
·
·

Posted to Making Ruby's Enumerator lazier over 1 year ago

FYI: In Ruby 2.0+ there's Enumerable#lazy. http://patshaughnessy.net/2013/4/3/ruby-2-0-works-hard-so-you-can-be-lazy

(Yes, I do realize this post talks about 1.9 😉)

@random-private: You're right, it's an ActiveRecord relation.

No problem. If you're new to Rails and you won't write queries like that too often, I'd recommend the first method or the one I described in the post, so you won't trouble yourself with libraries that do a bit of magic you don't yet grok ;)

@limeblast I think you have to install the mentioned arel-helpers gem to make it work.

Posted to git rebase --autosquash over 1 year ago

@bsimpson: I think you should add that note somewhere in the article, not many people are going to see that in the comments ;)

Achievements
316 Karma
33,866 Total ProTip Views