Database table name in array?

Is it possible to do something like this?

tables = Array[ “Xxx”, “Yyy”, “Zzz”]

for table in tables
results = table.find(:all, :conditions => ["…
end

I would try it and see. It will either work or not.

2009/1/30 James B. [email protected]

James B. wrote:

Is it possible to do something like this?

tables = Array[ “Xxx”, “Yyy”, “Zzz”]

for table in tables
@records = table.camelcase.constantize.find(:all, blah blah blah)
end