diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-13 17:33:27 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-13 17:33:27 -0500 |
commit | 420c4b3d8878156d04f45e47050ddc62ae00c68c (patch) | |
tree | e56d27d2078a7553b161a1088594e147e25ed2da /actionpack/lib/action_controller/caching | |
parent | be7fd8168aa4776dccfe2e670cb9451204449dd4 (diff) | |
download | rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.tar.gz rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.tar.bz2 rails-420c4b3d8878156d04f45e47050ddc62ae00c68c.zip |
Added Rails.public_path to control where HTML and assets are expected to be loaded from (defaults to Rails.root + "/public") #11581 [nicksieger]
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb index 4307f39583..755f1e4e0a 100644 --- a/actionpack/lib/action_controller/caching/pages.rb +++ b/actionpack/lib/action_controller/caching/pages.rb @@ -36,7 +36,7 @@ module ActionController #:nodoc: # == Setting the cache directory # # The cache directory should be the document root for the web server and is set using Base.page_cache_directory = "/document/root". - # For Rails, this directory has already been set to RAILS_ROOT + "/public". + # For Rails, this directory has already been set to Rails.public_path (which is usually set to RAILS_ROOT + "/public"). # # == Setting the cache extension # @@ -46,7 +46,7 @@ module ActionController #:nodoc: def self.included(base) #:nodoc: base.extend(ClassMethods) base.class_eval do - @@page_cache_directory = defined?(RAILS_ROOT) ? "#{RAILS_ROOT}/public" : "" + @@page_cache_directory = defined?(Rails.public_path) ? Rails.public_path : "" cattr_accessor :page_cache_directory @@page_cache_extension = '.html' |