aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-11-02 18:45:08 +0530
committerPratik Naik <pratiknaik@gmail.com>2008-11-02 18:45:08 +0530
commit09597f7140b3614573481020c980afadb01e4eb8 (patch)
tree1fd6e6468006b2277c93cd5bf484f6635599fa47 /actionpack
parent140a5c0d9d5868a9bae060e8702a894dee500012 (diff)
parentbe1beb1a2d2c32aeb907b34d9d451b7a853c924d (diff)
downloadrails-09597f7140b3614573481020c980afadb01e4eb8.tar.gz
rails-09597f7140b3614573481020c980afadb01e4eb8.tar.bz2
rails-09597f7140b3614573481020c980afadb01e4eb8.zip
Merge commit 'mainstream/master'
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/base.rb7
-rwxr-xr-xactionpack/lib/action_controller/request.rb3
2 files changed, 4 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 74c04147fb..087fdc35cd 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
# <tt>config.action_controller.relative_url_root</tt>
# 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
# <tt>request.env["REQUEST_URI"]</tt>.
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb
index 9f33cbc55f..a6d4abf029 100755
--- a/actionpack/lib/action_controller/request.rb
+++ b/actionpack/lib/action_controller/request.rb
@@ -9,10 +9,11 @@ module ActionController
class AbstractRequest
extend ActiveSupport::Memoizable
- def self.relative_url_root=(*args)
+ def self.relative_url_root=(relative_url_root)
ActiveSupport::Deprecation.warn(
"ActionController::AbstractRequest.relative_url_root= has been renamed." +
"You can now set it with config.action_controller.relative_url_root=", caller)
+ ActionController::base.relative_url_root=relative_url_root
end
HTTP_METHODS = %w(get head put post delete options)