I\'m in the process of upgrading an application to Rails 3. I\'ve decided to go with the mysql2 gem. There\'s some legacy code in the app that makes calls like:
I faced a similar issue a while back and found this to work:
result = ActiveRecord::Base.connection.execute(sql) result.each(:as => :hash) do |row| row["field"] end
edit: you could also use the select_all method of the connection object that returns a hash