diff options
author | Josiah Ivey <josiah.ivey@gmail.com> | 2010-08-16 21:32:08 -0500 |
---|---|---|
committer | Josiah Ivey <josiah.ivey@gmail.com> | 2010-08-16 21:32:08 -0500 |
commit | 9a665aa6d24e56f7c990cbdcd9a6e43188f75f94 (patch) | |
tree | 20c1989e23bab6392707bb91f3bcdffef6bd95ef | |
parent | 2a55edc725a4272c732dc93bd6aaec9ed0aa20cc (diff) | |
download | rails-9a665aa6d24e56f7c990cbdcd9a6e43188f75f94.tar.gz rails-9a665aa6d24e56f7c990cbdcd9a6e43188f75f94.tar.bz2 rails-9a665aa6d24e56f7c990cbdcd9a6e43188f75f94.zip |
Debugging Guide: Highlight using config over ActionView::Base
-rw-r--r-- | railties/guides/source/debugging_rails_applications.textile | 8 |
1 files changed, 4 insertions, 4 deletions
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+: <ruby> config.action_view[:debug_rjs] = true </ruby> -Or, at any time, set +ActionView::Base.debug_rjs+ to _true_: +Or, at any time, set +ActionView::Base.debug_rjs+ to true: <ruby> ActionView::Base.debug_rjs = true </ruby> +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 |