diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-04-02 11:55:58 -0400 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2013-04-02 11:55:58 -0400 |
commit | e267c0ee5e59812359b33676454178e788f798ec (patch) | |
tree | 383969547e05ca64aa7e94186d0f7a0765421665 /guides/bug_report_templates | |
parent | 9030015e99dd5b5b0cefe1c13723f11aab18f057 (diff) | |
download | rails-e267c0ee5e59812359b33676454178e788f798ec.tar.gz rails-e267c0ee5e59812359b33676454178e788f798ec.tar.bz2 rails-e267c0ee5e59812359b33676454178e788f798ec.zip |
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| |