Skip to content

Instantly share code, notes, and snippets.

@austra
Created October 28, 2015 16:04
Show Gist options
  • Save austra/f9f3f3364760efda320d to your computer and use it in GitHub Desktop.
Save austra/f9f3f3364760efda320d to your computer and use it in GitHub Desktop.
ActiveRecord::Base.connection
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