Permalink
Browse files

we haven't monkey patched the Result class, so use each

  • Loading branch information...
1 parent 4be9dbf commit a5a0338b9b3f2f24efde0ae6a56e99b938eff7cf @tenderlove tenderlove committed Jun 13, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -403,11 +403,13 @@ def collation
end
def tables(name = nil, database = nil) #:nodoc:
+ tables = []
+
sql = "SHOW TABLES "
sql << "IN #{quote_table_name(database)} " if database
result = execute(sql, 'SCHEMA')
- tables = result.collect { |field| field[0] }
+ result.each { |field| tables << field[0] }
result.free
tables
end

3 comments on commit a5a0338

Member

arunagw commented on a5a0338 Jun 13, 2012

👍

Contributor

joshaidan replied Jun 13, 2012

Thanks, was going to make the same change!

Thanks very much, this is so much better!

Please sign in to comment.