From b047929c14f088d535eea460ddd8769f43cd4ae5 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 2 Nov 2008 04:02:40 +0530 Subject: Merge with docrails --- actionpack/lib/action_controller/base.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/lib/action_controller/base.rb') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 74c04147fb..cf86c5eed0 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1062,6 +1062,9 @@ module ActionController #:nodoc: # When using redirect_to :back, if there is no referrer, # RedirectBackError will be raised. You may specify some fallback # behavior for this case by rescuing RedirectBackError. + # + # When using redirect_to an instance variable called + # @performed_redirect will be set to true. def redirect_to(options = {}, response_status = {}) #:doc: raise ActionControllerError.new("Cannot redirect to nil!") if options.nil? -- cgit v1.2.3 From 8a53e258e541ede706a30ece80d89b3097efb686 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sun, 2 Nov 2008 13:12:48 +0100 Subject: Backwards compatibility fixes for relative_url_root * Make the old deprecated relative_url_root still set the value as it's still used by mongrel * Set the default from the ENV value when the file is required, not at runtime. --- actionpack/lib/action_controller/base.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_controller/base.rb') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index cf86c5eed0..0cf74cd53e 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -364,11 +364,8 @@ module ActionController #:nodoc: # If you are deploying to a subdirectory, you will need to set # config.action_controller.relative_url_root # This defaults to ENV['RAILS_RELATIVE_URL_ROOT'] - cattr_writer :relative_url_root - - def self.relative_url_root - @@relative_url_root || ENV['RAILS_RELATIVE_URL_ROOT'] - end + cattr_accessor :relative_url_root + self.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] # Holds the request object that's primarily used to get environment variables through access like # request.env["REQUEST_URI"]. -- cgit v1.2.3 From be1beb1a2d2c32aeb907b34d9d451b7a853c924d Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 2 Nov 2008 18:36:14 +0530 Subject: Dont document internals --- actionpack/lib/action_controller/base.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'actionpack/lib/action_controller/base.rb') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 0cf74cd53e..087fdc35cd 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1059,9 +1059,6 @@ module ActionController #:nodoc: # When using redirect_to :back, if there is no referrer, # RedirectBackError will be raised. You may specify some fallback # behavior for this case by rescuing RedirectBackError. - # - # When using redirect_to an instance variable called - # @performed_redirect will be set to true. def redirect_to(options = {}, response_status = {}) #:doc: raise ActionControllerError.new("Cannot redirect to nil!") if options.nil? -- cgit v1.2.3 From 934f98e4cf7c43f8c632496b02ac99492d6b3de1 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 2 Nov 2008 23:19:44 +0530 Subject: Dont dup params twice when filter_parameters is present --- actionpack/lib/action_controller/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/base.rb') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 087fdc35cd..61f9f354c3 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1244,8 +1244,8 @@ module ActionController #:nodoc: end def log_processing_for_parameters - parameters = respond_to?(:filter_parameters) ? filter_parameters(params) : params - parameters = parameters.except(:controller, :action, :format) + parameters = respond_to?(:filter_parameters) ? filter_parameters(params) : params.dup + parameters = parameters.except!(:controller, :action, :format) logger.info " Parameters: #{parameters.inspect}" end -- cgit v1.2.3 From 18bf7b421d55c60029289edef1df409a58d021e4 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 2 Nov 2008 23:23:19 +0530 Subject: Remove unused debug_routes --- actionpack/lib/action_controller/base.rb | 6 ------ 1 file changed, 6 deletions(-) (limited to 'actionpack/lib/action_controller/base.rb') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 61f9f354c3..b001b355dc 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -278,12 +278,6 @@ module ActionController #:nodoc: @@consider_all_requests_local = true cattr_accessor :consider_all_requests_local - # Enable or disable the collection of failure information for RoutingErrors. - # This information can be extremely useful when tweaking custom routes, but is - # pointless once routes have been tested and verified. - @@debug_routes = true - cattr_accessor :debug_routes - # Indicates whether to allow concurrent action processing. Your # controller actions and any other code they call must also behave well # when called from concurrent threads. Turned off by default. -- cgit v1.2.3