aboutsummaryrefslogtreecommitdiffstats
path: root/guides/bug_report_templates/active_record_gem.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-04-02 11:55:58 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2013-04-02 11:55:58 -0400
commite267c0ee5e59812359b33676454178e788f798ec (patch)
tree383969547e05ca64aa7e94186d0f7a0765421665 /guides/bug_report_templates/active_record_gem.rb
parent9030015e99dd5b5b0cefe1c13723f11aab18f057 (diff)
downloadrails-e267c0ee5e59812359b33676454178e788f798ec.tar.gz
rails-e267c0ee5e59812359b33676454178e788f798ec.tar.bz2
rails-e267c0ee5e59812359b33676454178e788f798ec.zip
write sql queries to terminal
Diffstat (limited to 'guides/bug_report_templates/active_record_gem.rb')
-rw-r--r--guides/bug_report_templates/active_record_gem.rb4
1 files changed, 3 insertions, 1 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|