Last active
May 3, 2017 17:31
-
-
Save subelsky/ad978389933b772e6d673e397d423c6e to your computer and use it in GitHub Desktop.
How to make activerecord log SQL to the console
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
# makes Rails logs appear in the console, useful for seeing the actual SQL query generated from an AR find for example | |
# put this in ~/.railsrc | |
require 'logger' | |
Rails.logger = Logger.new STDOUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment