g4uk (@g4uk_) profile picture

Ruby Developer

Joined September 2017
Photo by g4uk (@g4uk_)
Answer: How to show SQL queries run in the Rails console? stackoverflow.com/a/2936016?…
51
Big O Notation Overview
5
345
8
2,115
227,335
g4uk retweeted
If you are a Ruby dev and not yet enchanted by my previous pattern matching tweets... Be prepared for my most powerful spell. 🧙‍♀️ Do you remember when you've first saw how powerful Regexps were? And magical? 🪄✨💎 Pattern matching = Regexp for Data structures. Check this out👇
7
11
1
97
N+1s occur often with ActiveRecord when working with scopes (and `some_association.where`). `where` breaks eager loading. Sometimes, checking if the association is `loaded?` and providing a pure-Ruby way to get the subset you want is much faster than the N+1.
5
20
185
💎Rails tip💎 Need to test some code that runs queries? The Rails console sandbox is the perfect place to play around without affecting your development data. #ruby #rails #rubyonrails
13
53
5
328