aboutsummaryrefslogtreecommitdiffstats
path: root/guides/bug_report_templates/active_record_master.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-02 09:04:04 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-04-02 09:04:04 -0700
commit1b6ac82c0feb77dc483bd176650413f28812f994 (patch)
tree6ac29e695bc2ca389694dfbfda4495ceebbe8207 /guides/bug_report_templates/active_record_master.rb
parent196af50e459e015da7385db753d1e33ae25f3d62 (diff)
parente267c0ee5e59812359b33676454178e788f798ec (diff)
downloadrails-1b6ac82c0feb77dc483bd176650413f28812f994.tar.gz
rails-1b6ac82c0feb77dc483bd176650413f28812f994.tar.bz2
rails-1b6ac82c0feb77dc483bd176650413f28812f994.zip
Merge pull request #10052 from neerajdotname/stdout-in-log
write sql queries to terminal
Diffstat (limited to 'guides/bug_report_templates/active_record_master.rb')
-rw-r--r--guides/bug_report_templates/active_record_master.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/guides/bug_report_templates/active_record_master.rb b/guides/bug_report_templates/active_record_master.rb
index 9a3ccd8554..99107b83cf 100644
--- a/guides/bug_report_templates/active_record_master.rb
+++ b/guides/bug_report_templates/active_record_master.rb
@@ -12,10 +12,12 @@ require 'bundler'
Bundler.setup(:default)
require 'active_record'
-require "minitest/autorun"
+require 'minitest/autorun'
+require 'logger'
# This connection will do for database-independent bug reports.
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
+ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define do
create_table :posts do |t|