# Limit number of results from dynamic finders

**URL:** <https://www.ruby-forum.com/t/limit-number-of-results-from-dynamic-finders/103392>\
**Category:** Rails\
**Created:** [May 5, 2007, 1:53am UTC](https://www.ruby-forum.com/t/limit-number-of-results-from-dynamic-finders/103392 "2007-05-05T01:53:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehudros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Post date:** [May 5, 2007, 1:53am UTC](https://www.ruby-forum.com/t/limit-number-of-results-from-dynamic-finders/103392/1 "2007-05-05T01:53:54Z")

</div>

Hi everyone,  
I’m looking for a way to limit the number of results returned by the  
select genereted when I use the following syntax:  
User.posts.each { |post| … }

I’m not sure those are dynamic finders per se, but I’m not familier with  
the correct term. any way, I’d like to only select the first 5 posts  
withut using find\_by\_sql or find(:all, :limit =\> 5).

Is that possible?

Thanks,  
Ehud
