Created
October 28, 2015 16:04
-
-
Save austra/f9f3f3364760efda320d to your computer and use it in GitHub Desktop.
ActiveRecord::Base.connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
raw = ActiveRecord::Base.connection.execute(sql) | |
raw.each(:as => :hash) do |row| | |
puts row.inspect # row is hash | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment