There are only a few configuration options for Action View, starting with four on +ActionView::Base+:
There are only a few configuration options for Action View, starting with four on +ActionView::Base+:
* +config.action_view.debug_rjs+ specifies whether RJS responses should be wrapped in a try/catch block that alerts the caught exception (and then re-raises it). The default is +false+.
* +config.action_view.field_error_proc+ provides an HTML generator for displaying errors that come from Active Record. The default is <tt>Proc.new{ |html_tag, instance| %Q(%<div class="field_with_errors">#{html_tag}</div>).html_safe }</tt>
* +config.action_view.field_error_proc+ provides an HTML generator for displaying errors that come from Active Record. The default is <tt>Proc.new{ |html_tag, instance| %Q(%<div class="field_with_errors">#{html_tag}</div>).html_safe }</tt>
* +config.action_view.default_form_builder+ tells Rails which form builder to use by default. The default is +ActionView::Helpers::FormBuilder+.
* +config.action_view.default_form_builder+ tells Rails which form builder to use by default. The default is +ActionView::Helpers::FormBuilder+.
Rails has optional built-in support to debug RJS. When enabled, responses are wrapped in a try/catch block that displays the caught exception using +alert()+, and then re-raises it.
The flag to enable RJS debugging in your configuration files is +config.action_view.debug_rjs+:
<ruby>
config.action_view.debug_rjs = true
</ruby>
or at any time setting +ActionView::Base.debug_rjs+:
<ruby>
ActionView::Base.debug_rjs = true
</ruby>
It is enabled by default in development mode, and disabled in the rest.
TIP: For more information on debugging JavaScript, refer to "Firebug":http://getfirebug.com/, the popular debugger for Firefox.
h3. The Logger
h3. The Logger
It can also be useful to save information to log files at runtime. Rails maintains a separate log file for each runtime environment.
It can also be useful to save information to log files at runtime. Rails maintains a separate log file for each runtime environment.