Created
August 27, 2016 00:05
-
-
Save ryanermita/20b76d87768a5e3b5459c314e65a2386 to your computer and use it in GitHub Desktop.
Running raw SQL in Ruby on Rails
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
# Running raw SQL in Ruby on Rails | |
sql = "SELECT * FROM table_name" | |
result = ActiveRecord::Base.connection.execute(sql) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment