mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
ActionController::Base.relative_url_root falls back to ENV['RAILS_RELATIVE_URL_ROOT']
This commit is contained in:
@@ -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>.
|
||||
|
||||
Reference in New Issue
Block a user