Login
Roast topics
Find topics
Find it!
From:
Boring Rails: Skip the bullshit and ship fast |
(Uncensored)
subscribe
Find records missing an association with `where.missing`
https://boringrails.com/tips/activerecord-where-missing-associations
links
backlinks
Tagged with:
ruby
rails
Roast topics
Find topics
Roast it!
You can’t prove a negative, but what about querying a database for a negative? While the majority of the time you are writing queries to find data, there are some cases when you want the opposite: writing a query that looks for the absence of data.