2. This looks to be a minor optimisation in the best case (select 1 … query vs. association load), but at worst you’ll execute many select 1 queries, one for each feature you need to check existence for. If you use .any?, the association is loaded once and cached, so you’ll only have one query.

Comments