Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Why should you avoid calling `where` in ActiveRecord model instance methods?

25,498 görüntüleme • 1 yıl önce •via X (Twitter)

10 Yorum

Nate Berkopec profil fotoğrafı
Nate Berkopec1 yıl önce

i'll learn how to screencast properly one day, today you're just gonna have to squint

austn.net profil fotoğrafı
austn.net1 yıl önce

Oooooh I have a staff engineer who's gonna hate that I know this now

Nolan profil fotoğrafı
Nolan1 yıl önce

I have found today’s activity

John Athayde profil fotoğrafı
John Athayde1 yıl önce

Awesome. I had not seen that Justin Weiss article, but I’m going to give that a whirl on some persistent N+1 issues I have.

Jeremy Kreutzbender profil fotoğrafı
Jeremy Kreutzbender1 yıl önce

The comment I wrote a few days ago speaks for itself. The jira_project method does a funky find_by using data from a json column

daniel T. profil fotoğrafı
daniel T.1 yıl önce

can you share the article that you mentioned on the video ? 🙏

Mikkel Malmberg profil fotoğrafı
Mikkel Malmberg1 yıl önce

Totally agree. The `where` is a good way to remember to look out for something like this. For the problem at hand, this is probably something you ought to do once at write time and in that case the N+1 wouldn't be (as big) a problem.

Justin Marsh profil fotoğrafı
Justin Marsh1 yıl önce

Great job. 💪🏼 I would love watch to have more of these!

gato magro profil fotoğrafı
gato magro1 yıl önce

Interesting that I'd never seen AR methods used in such way in model instances(instead it was something resembling query builder or scope), but quite lot of times inside facades/presenters

CuriousWBT profil fotoğrafı
CuriousWBT1 yıl önce

I really appreciate your straightforward delivery.

Benzer Videolar