public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
ActionController::Base.relative_url_root falls back to 
ENV['RAILS_RELATIVE_URL_ROOT']
josh (author)
Thu Jul 24 12:06:22 -0700 2008
commit  f48b9ab5c2741ddbdbc0a9f4cd06875a1e3c8b02
tree    5341ba9bdb9b58cf144a21076945a6563327695b
parent  11fdcf88c2aea72ec84c5d4ab05986f5d35a9a81
...
356
357
358
359
 
 
 
 
 
 
360
361
362
...
356
357
358
 
359
360
361
362
363
364
365
366
367
0
@@ -356,7 +356,12 @@ module ActionController #:nodoc:
0
 
0
     # If you are deploying to a subdirectory, you will need to set
0
     # <tt>config.action_controller.relative_url_root</tt>
0
- class_inheritable_accessor :relative_url_root
0
+ # This defaults to ENV['RAILS_RELATIVE_URL_ROOT']
0
+ cattr_writer :relative_url_root
0
+
0
+ def self.relative_url_root
0
+ @@relative_url_root || ENV['RAILS_RELATIVE_URL_ROOT']
0
+ end
0
 
0
     # Holds the request object that's primarily used to get environment variables through access like
0
     # <tt>request.env["REQUEST_URI"]</tt>.

Comments

    No one has commented yet.