ActionController::Base.relative_url_root falls back to ENV['RAILS_RELATIVE_URL_ROOT']

This commit is contained in:
Joshua Peek
2008-07-24 14:06:22 -05:00
parent 11fdcf88c2
commit f48b9ab5c2

View File

@@ -356,7 +356,12 @@ module ActionController #:nodoc:
# If you are deploying to a subdirectory, you will need to set
# <tt>config.action_controller.relative_url_root</tt>
class_inheritable_accessor :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
# Holds the request object that's primarily used to get environment variables through access like
# <tt>request.env["REQUEST_URI"]</tt>.