# Scope Find On Non ActiveRecord Models

**URL:** <https://www.ruby-forum.com/t/scope-find-on-non-activerecord-models/118789>\
**Category:** Rails\
**Created:** [October 30, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/scope-find-on-non-activerecord-models/118789 "2007-10-30T23:07:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 30, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/scope-find-on-non-activerecord-models/118789/1 "2007-10-30T23:07:31Z")

</div>

I have the following setup

class User \< MySuperClass #not an AR model  
attr\_accessor :id, :name  
end

class Picture \< AR::Base  
end

Picture’s db table looks something like  
-id  
-user\_id  
-size

I want to be able to do @user.pictures.find(:all, :conditions =\> 'size

> 100’) and other scoped find calls for pictures. Is there any plugin  
> or other technique I can use to achieve this sort of coding style? If  
> the classes were both AR models this would be as simple as  
> establishing an association proxy but since User is not an AR model I  
> don’t know how to create scope for the find.

Thank you,  
Matt M.
