# With\_scope :limit is ignored when I do an association

**URL:** <https://www.ruby-forum.com/t/with-scope-limit-is-ignored-when-i-do-an-association/91052>\
**Category:** Rails\
**Created:** [April 4, 2007, 3:59am UTC](https://www.ruby-forum.com/t/with-scope-limit-is-ignored-when-i-do-an-association/91052 "2007-04-04T03:59:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [April 4, 2007, 3:59am UTC](https://www.ruby-forum.com/t/with-scope-limit-is-ignored-when-i-do-an-association/91052/1 "2007-04-04T03:59:33Z")

</div>

c is a Company and c has\_many :videos.

> > Video.with\_scope(:find =\> { :limit =\> 5 }) { c.videos }.size  
> > =\> 13

it works though when I don’t use the association

> > Video.with\_scope(:find =\> { :limit =\> 5 }) { Video.find :all }.size  
> > =\> 5

I found a ticket [1] whose description says it addresses this issue,  
but the code definitely looks like it doesn’t…anyway does anyone  
know of a workaround for this?

Pat

[1] [http://dev.rubyonrails.org/ticket/5208](http://dev.rubyonrails.org/ticket/5208)
