[Rails] Re: Database table name in array?

2009-01-30 Thread Ar Chron
James Bond 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 -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~

[Rails] Re: Database table name in array?

2009-01-30 Thread Colin Law
I would try it and see. It will either work or not. 2009/1/30 James Bond > > Is it possible to do something like this? > > tables = Array[ "Xxx", "Yyy", "Zzz"] > > for table in tables > results = table.find(:all, :conditions => [". > end > -- > Posted via http://www.ruby-forum.com/. > > > >