mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Debugging Guide: Improve grammar for the RJS section
This commit is contained in:
@@ -98,7 +98,7 @@ Title: Rails debugging guide
|
||||
|
||||
h4. Debugging JavaScript
|
||||
|
||||
Rails has built-in support to debug RJS, to active it, set +ActionView::Base.debug_rjs+ to _true_, this will specify whether RJS responses should be wrapped in a try/catch block that alert()s the caught exception (and then re-raises it).
|
||||
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+:
|
||||
|
||||
@@ -106,13 +106,13 @@ To enable it, add the following in the +Rails::Initializer do |config|+ block in
|
||||
config.action_view[:debug_rjs] = true
|
||||
</ruby>
|
||||
|
||||
Or, at any time, setting +ActionView::Base.debug_rjs+ to _true_:
|
||||
Or, at any time, set +ActionView::Base.debug_rjs+ to _true_:
|
||||
|
||||
<ruby>
|
||||
ActionView::Base.debug_rjs = true
|
||||
</ruby>
|
||||
|
||||
TIP: For more information on debugging javascript refer to "Firebug":http://getfirebug.com/, the popular debugger for Firefox.
|
||||
TIP: For more information on debugging JavaScript, refer to "Firebug":http://getfirebug.com/, the popular debugger for Firefox.
|
||||
|
||||
h3. The Logger
|
||||
|
||||
|
||||
Reference in New Issue
Block a user