From d8f23ca627df85b33fe8db87db5483c10b62bfe6 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 27 Mar 2011 22:23:32 +0200 Subject: [PATCH] removes debug_rjs from ActionView::Base --- actionpack/lib/action_view/base.rb | 5 ----- railties/guides/source/configuring.textile | 2 -- .../debugging_rails_applications.textile | 20 ------------------- .../config/environments/development.rb.tt | 1 - 4 files changed, 28 deletions(-) diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 5519103627..aefdb59e59 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -157,11 +157,6 @@ module ActionView #:nodoc: class Base include Helpers, Rendering, Partials, ::ERB::Util, Context - # Specify whether RJS responses should be wrapped in a try/catch block - # that alert()s the caught exception (and then re-raises it). - cattr_accessor :debug_rjs - @@debug_rjs = false - # Specify the proc used to decorate input tags that refer to attributes with errors. cattr_accessor :field_error_proc @@field_error_proc = Proc.new{ |html_tag, instance| "
#{html_tag}
".html_safe } diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile index 9ca567129b..53460b8c36 100644 --- a/railties/guides/source/configuring.textile +++ b/railties/guides/source/configuring.textile @@ -291,8 +291,6 @@ h4. Configuring Action View 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 Proc.new{ |html_tag, instance| %Q(%<div class="field_with_errors">#{html_tag}</div>).html_safe } * +config.action_view.default_form_builder+ tells Rails which form builder to use by default. The default is +ActionView::Helpers::FormBuilder+. diff --git a/railties/guides/source/debugging_rails_applications.textile b/railties/guides/source/debugging_rails_applications.textile index 045b8823ca..fb17dccfb8 100644 --- a/railties/guides/source/debugging_rails_applications.textile +++ b/railties/guides/source/debugging_rails_applications.textile @@ -96,26 +96,6 @@ Will be rendered as follows: Title: Rails debugging guide -h4. Debugging RJS - -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+: - - -config.action_view.debug_rjs = true - - -or at any time setting +ActionView::Base.debug_rjs+: - - -ActionView::Base.debug_rjs = true - - -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 It can also be useful to save information to log files at runtime. Rails maintains a separate log file for each runtime environment. diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt index bdb897ad33..41b2374eda 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt @@ -11,7 +11,6 @@ # Show full error reports and disable caching config.consider_all_requests_local = true - config.action_view.debug_rjs = true config.action_controller.perform_caching = false # Don't care if the mailer can't send -- GitLab