Is it possible to do something like this?
tables = Array[ “Xxx”, “Yyy”, “Zzz”]
for table in tables
results = table.find(:all, :conditions => ["…
end
Is it possible to do something like this?
tables = Array[ “Xxx”, “Yyy”, “Zzz”]
for table in tables
results = table.find(:all, :conditions => ["…
end
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs