From 9a665aa6d24e56f7c990cbdcd9a6e43188f75f94 Mon Sep 17 00:00:00 2001 From: Josiah Ivey Date: Mon, 16 Aug 2010 21:32:08 -0500 Subject: Debugging Guide: Highlight using config over ActionView::Base --- railties/guides/source/debugging_rails_applications.textile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties') diff --git a/railties/guides/source/debugging_rails_applications.textile b/railties/guides/source/debugging_rails_applications.textile index ccd538d1e8..07c6f6b65d 100644 --- a/railties/guides/source/debugging_rails_applications.textile +++ b/railties/guides/source/debugging_rails_applications.textile @@ -98,20 +98,20 @@ Title: Rails debugging guide h4. Debugging JavaScript -Rails has built-in support to debug RJS – to activate it, set +ActionView::Base.debug_rjs+ to _true_. This will specify that RJS responses should be wrapped in a try/catch block that displays the caught exception using +alert()+ (and then re-raises it). - -To enable it, add the following in the +Rails::Initializer do |config|+ block inside +environment.rb+: +Rails has built-in support to debug RJS. To enable it, add the following in the +Rails::Initializer do |config|+ block inside +environment.rb+: config.action_view[:debug_rjs] = true -Or, at any time, set +ActionView::Base.debug_rjs+ to _true_: +Or, at any time, set +ActionView::Base.debug_rjs+ to true: ActionView::Base.debug_rjs = true +This will specify that RJS responses should be wrapped in a try/catch block that displays the caught exception using +alert()+ (and then re-raises it). + TIP: For more information on debugging JavaScript, refer to "Firebug":http://getfirebug.com/, the popular debugger for Firefox. h3. The Logger -- cgit v1.2.3