From: Mark Thomas Date: 2009-03-31T23:09:46+09:00 Subject: Re: activerecord query building question > > > RefPhysLocation.find_all_by_state("OH").each do |location| > >   puts location.refphys.name > > end > > That would probably work really well in a Rails app, but I get a > nomethoderror when I try that.. Maybe there's something else I need to > do before those methods will work Yes, you have to change the methods to match your database. You did not provide a schema, so I just used examples. find_all_by_state won't work if you don't have a state field. You'll have to change find_all_by_state to find_all_by_zip or whatever find criteria you will use to determine the area. You'll also have to change refphys.name to actual attribute(s) of a RefPhys.