Загрузка видео...

Не удалось загрузить видео

На главную

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

25,498 просмотров • 1 год назад •via X (Twitter)

Комментарии: 10

Фото профиля Nate Berkopec
Nate Berkopec1 год назад

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

Фото профиля austn.net
austn.net1 год назад

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

Фото профиля Nolan
Nolan1 год назад

I have found today’s activity

Фото профиля John Athayde
John Athayde1 год назад

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
Jeremy Kreutzbender1 год назад

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.
daniel T.1 год назад

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

Фото профиля Mikkel Malmberg
Mikkel Malmberg1 год назад

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
Justin Marsh1 год назад

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

Фото профиля gato magro
gato magro1 год назад

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
CuriousWBT1 год назад

I really appreciate your straightforward delivery.

Похожие видео