Want more GoRails?

GoRails is packed full with 736 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Where Any? vs Exists?

March 17, 2025

Track your progress

Sign in to track your progress and access subscription-only lessons.

Log In

Your Teacher

Collin Jilbert

Ruby on Rails Developer | Lover of Music | Skateboarder | Proud Papa | Co-editor @therubyradar | Launched @fleur_de_ruby

About This Episode

In this lesson, we will look at using the exists? method from active record to check if any records are returned from a query just like with using .where(..).any? but without the overhead of loading all of the records into memory.

Want to stay up-to-date with Ruby on Rails?

Join 89,237+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.