diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-02 09:04:04 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-02 09:04:04 -0700 |
commit | 1b6ac82c0feb77dc483bd176650413f28812f994 (patch) | |
tree | 6ac29e695bc2ca389694dfbfda4495ceebbe8207 /guides/bug_report_templates | |
parent | 196af50e459e015da7385db753d1e33ae25f3d62 (diff) | |
parent | e267c0ee5e59812359b33676454178e788f798ec (diff) | |
download | rails-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')
-rw-r--r-- | guides/bug_report_templates/active_record_gem.rb | 4 | ||||
-rw-r--r-- | guides/bug_report_templates/active_record_master.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/guides/bug_report_templates/active_record_gem.rb b/guides/bug_report_templates/active_record_gem.rb index 5ef1397ecd..19b7309dd7 100644 --- a/guides/bug_report_templates/active_record_gem.rb +++ b/guides/bug_report_templates/active_record_gem.rb @@ -1,10 +1,12 @@ # Activate the gem you are reporting the issue against. gem 'activerecord', '3.2.11' 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| 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| |