Skip to content

Commit

Permalink
ActionController::Base.relative_url_root falls back to ENV['RAILS_REL…
Browse files Browse the repository at this point in the history
…ATIVE_URL_ROOT']
  • Loading branch information
josh committed Jul 24, 2008
1 parent 11fdcf8 commit f48b9ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion actionpack/lib/action_controller/base.rb
Expand Up @@ -356,7 +356,12 @@ class Base

# 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>.
Expand Down

0 comments on commit f48b9ab

Please sign in to comment.