From de203245afd2bbf7f93f3241fcf3a71a88101d47 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 28 May 2009 09:49:02 -0500 Subject: Revert "Revert "Whitespace!"" This reverts commit 0cac68d3bed3e6bf8ec2eb994858e4a179046941. --- .../action_controller/new_base/compatibility.rb | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'actionpack/lib/action_controller/new_base/compatibility.rb') diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb index c09e086b1b..1d0cb601e3 100644 --- a/actionpack/lib/action_controller/new_base/compatibility.rb +++ b/actionpack/lib/action_controller/new_base/compatibility.rb @@ -9,43 +9,43 @@ module ActionController included do ::ActionController::UnknownAction = ::AbstractController::ActionNotFound ::ActionController::DoubleRenderError = ::AbstractController::DoubleRenderError - + cattr_accessor :session_options self.session_options = {} - + cattr_accessor :allow_concurrency self.allow_concurrency = false - + cattr_accessor :param_parsers self.param_parsers = { Mime::MULTIPART_FORM => :multipart_form, Mime::URL_ENCODED_FORM => :url_encoded_form, Mime::XML => :xml_simple, Mime::JSON => :json } - + cattr_accessor :relative_url_root self.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] - + cattr_accessor :default_charset self.default_charset = "utf-8" - + # cattr_reader :protected_instance_variables cattr_accessor :protected_instance_variables self.protected_instance_variables = %w(@assigns @performed_redirect @performed_render @variables_added @request_origin @url @parent_controller @action_name @before_filter_chain_aborted @action_cache_path @_headers @_params @_flash @_response) - + # Indicates whether or not optimise the generated named # route helper methods cattr_accessor :optimise_named_routes self.optimise_named_routes = true - + cattr_accessor :resources_path_names self.resources_path_names = { :new => 'new', :edit => 'edit' } - + # Controls the resource action separator cattr_accessor :resource_action_separator self.resource_action_separator = "/" - + cattr_accessor :use_accept_header self.use_accept_header = true @@ -65,7 +65,7 @@ module ActionController cattr_accessor :ip_spoofing_check self.ip_spoofing_check = true end - + # For old tests def initialize_template_class(*) end def assign_shortcuts(*) end @@ -81,7 +81,9 @@ module ActionController end module ClassMethods - def consider_all_requests_local() end + def consider_all_requests_local + end + def rescue_action(env) raise env["action_dispatch.rescue.exception"] end @@ -91,12 +93,12 @@ module ActionController @@cache_store = ActiveSupport::Cache.lookup_store(store_option) end end - + def render_to_body(options) if options.is_a?(Hash) && options.key?(:template) options[:template].sub!(/^\//, '') end - + options[:text] = nil if options[:nothing] == true body = super @@ -110,8 +112,8 @@ module ActionController def method_for_action(action_name) super || (respond_to?(:method_missing) && "_handle_method_missing") - end - + end + def _layout_prefix(name) super unless name =~ /\blayouts/ end -- cgit v1.2.3