Rails paginate issue

Hi,

I have a weird problem. The following code:

def my_def
@pictures = Picture.select_pictures(…)

print out length of @pictures.length -> 0

@pictures_pages, @pictures = paginate(:pictures)
end

For some reason, the pagination still returns results eventhough the
instance variable @pictures is empty. What exactly is :pictures and how
does it get cleared. Clearly, after printing out the @pictures.length,
there should not be any data paginated and that’s the behavior I want.
Has anybody ran into this problem?

Thanks.