# File app/models/translation.rb, line 82 def self.query_db_for_strings # "Touch" Person and Proposal first, as they might dynamically # create catalog models (see acts_as_magic_model) Person Proposal catalogs = self.connection.catalogs.map { |cat| begin catalog = cat.classify.constantize rescue NameError # This looks like a catalog, but is not defined. Skip it. end }.reject {|c| c.nil?} # Add some tables not recognized as catalogs, but which work as such catalogs << AdminTask catalogs.uniq.sort_by {|c| c.to_s}.each do |cat| cat.find(:all).each do |elem| self.for('%s|%s' % [cat.to_s, elem.name]) end end end