Did you guys just recommend using default scopes? Eager loading something on the default scope is not that bad, but it's so easy to abuse I'd rather avoid it, especially in educational videos.
being explicit is always better with scopes, faster than not you'll find yourself with situation when you want to reverse default_scope, and unscoped ugliness is confusing and bug-prone
I don't think that using default scope is a good idea. If the team is large, in future there is high chances of someone not checking default scope. I prefer using "includes" wherever necessary explicitly.
You can refactor your command line at the beginning to be rake db:{create,migrate,seed}
Great vid my man
Did you guys just recommend using default scopes? Eager loading something on the default scope is not that bad, but it's so easy to abuse I'd rather avoid it, especially in educational videos.
being explicit is always better with scopes, faster than not you'll find yourself with situation when you want to reverse default_scope, and unscoped ugliness is confusing and bug-prone
I guess I am kinda off topic but do anybody know a good website to stream newly released tv shows online?
I don't think that using default scope is a good idea. If the team is large, in future there is high chances of someone not checking default scope. I prefer using "includes" wherever necessary explicitly.
great! nice tricks, didn't know about merge ;)
Great video, thanks Dave!
Very cool tricks!, I am a subscriber now
Very nice video. Thank you
Thank you great video
What is the difference between includes and join can any one explain?
includes does two things, it eager loads and does an inner join. A join does not eager load.
@@nikitak9628 thank you nikita.
ah what i wouldn't do for that repo to practice on.
The repo is available at www.driftingruby.com/episodes/activerecord-tricks
@@DriftingRuby Amazing! Thank you.
A fcking genius man!