Skip to content

Instantly share code, notes, and snippets.

View ephekt's full-sized avatar

Mike R ephekt

  • maker of things
  • California
View GitHub Profile
@ephekt
ephekt / irbrc.rb
Created July 2, 2013 20:04
Enable ActiveRecord to output raw queries in Rails Console
# In your active `rails c` session type
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.connection_pool.clear_reloadable_connections!
# or, in your ~/.irbrc add the following
require 'rubygems'
if ENV.include?('RAILS_ENV') && ENV["RAILS_ENV"] == 'development'