With_scope :limit is ignored when I do an association


#1

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