# Dynamic finders vs. standard find(:all) with condition

**URL:** <https://www.ruby-forum.com/t/dynamic-finders-vs-standard-find-all-with-condition/86914>\
**Category:** Rails\
**Created:** [February 26, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/dynamic-finders-vs-standard-find-all-with-condition/86914 "2007-02-26T21:46:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pond](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@pond](https://www.ruby-forum.com/u/pond)\
**Post date:** [February 26, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/dynamic-finders-vs-standard-find-all-with-condition/86914/1 "2007-02-26T21:46:47Z")

</div>

Is there a difference between the way collections are returned using a  
dynamic finder and a standard find all with a condition?

I decided to convert this…

@reservations = Reservation.find(:all, :conditions =\> [“status = ?”,  
“Pending”])

…to this…

@reservations = Reservation.find\_by\_status(“Pending”)

…because it’s much more readable and I prefer dynamic finders over  
conditions whenever possible. However, the collection returned by the  
dynamic finder apparently doesn’t have the “empty?” method available to  
it. I use @reservations.empty? in my view to evaluate if I have an  
empty collection of objects and react accordingly.

Is there something I’m missing? Do dynamic finders return objects in a  
different manner than regular finds?

---

<div class="post-metadata">

**Author:** ![pond](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/7ab992/32.png) [@pond](https://www.ruby-forum.com/u/pond)\
**Post date:** [February 26, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/dynamic-finders-vs-standard-find-all-with-condition/86914/2 "2007-02-26T21:53:08Z")

</div>

Bah I’m an idiot. Disregard this. I forgot to use find\_all\_by\_status  
instead of find\_by\_status.
