aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/initialization.textile
diff options
context:
space:
mode:
authorRyan Bigg <ryan@getup.org.au>2010-03-31 11:48:42 +0100
committerRyan Bigg <ryan@getup.org.au>2010-03-31 11:48:42 +0100
commit1a054459cbe4caa377586da6573875a883858bbf (patch)
tree125ef5e68200490ec622093ea7234dab054922cb /railties/guides/source/initialization.textile
parent2d86124e8d6cdf8c87194423b89d6878f086424d (diff)
downloadrails-1a054459cbe4caa377586da6573875a883858bbf.tar.gz
rails-1a054459cbe4caa377586da6573875a883858bbf.tar.bz2
rails-1a054459cbe4caa377586da6573875a883858bbf.zip
Fix missing quote and remove core ext explanation.
Diffstat (limited to 'railties/guides/source/initialization.textile')
-rw-r--r--railties/guides/source/initialization.textile29
1 files changed, 4 insertions, 25 deletions
diff --git a/railties/guides/source/initialization.textile b/railties/guides/source/initialization.textile
index 49a081b0e0..590f9e1a81 100644
--- a/railties/guides/source/initialization.textile
+++ b/railties/guides/source/initialization.textile
@@ -525,7 +525,7 @@ If you generate the application with the +-O+ option this will put a couple of p
For the purposes of this guide, will will assume only:
<ruby>
- require 'rails/all
+ require 'rails/all'
</ruby>
h4. +require "rails/all"+
@@ -586,32 +586,11 @@ h4. +require 'active_support/core_ext/kernel/reporting'+
This file extends the +Kernel+ module, providing the methods +silence_warnings+, +enable_warnings+, +with_warnings+, +silence_stderr+, +silence_stream+ and +suppress+. The API documentation on these overridden methods is fairly good and if you wish to know more "have a read.":http://api.rubyonrails.org/classes/Kernel.html
-h4. +require 'active_support/core_ext/logger'+
-
-The first line in this file is +require 'active_support/core_ext/class/attribute_accessors'+ which defines methods such as +cattr_accessor+, +cattr_reader+ and +cattr_writer+ which are used later when the +Logger+ class is extended.
-
-This is another class that is "well documented":http://api.rubyonrails.org/classes/Logger.html except for a set of the methods it defines which are the around helpers specified for all levels of logging: +debug+, +info+, +error+ and +fatal+. The benefit of these methods is that if you want to output your debugging information wrapped in say, 50 stars top and bottom, you can do this in your (TODO: pick a file, any file.)
-
-<ruby>
- ActiveRecord::Base.logger.around_info(["*" * 50], ["*" * 50]) do
- Post.first
- end
-</ruby>
-
-Your info output will now have 50 stars above it, and 50 below it. This is handy for locating the relevant information in a massive output.
-
-Alternatively you could just silence one of the other streams by using +silence+:
-
-<ruby>
- ActiveRecord::Base.logger.silence("info") do
- 1..999.times do |n|
- Blog.find_by_id(n)
- end
- end
-</ruby>
+For information on this file see the "Core Extensions" guide. TODO: link to guide.
-Now you won't get any SQL output in your logs.
+h4. +require 'active_support/core_ext/logger'+
+For information on this file see the "Core Extensions" guide. TODO: link to guide.
h4. +require 'rails/application'+