Skip to content

Commit

Permalink
Debugging Guide: Highlight using config over ActionView::Base
Browse files Browse the repository at this point in the history
  • Loading branch information
jivey committed Aug 17, 2010
1 parent 2a55edc commit 9a665aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions railties/guides/source/debugging_rails_applications.textile
Expand Up @@ -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
Expand Down

0 comments on commit 9a665aa

Please sign in to comment.