diff options
Diffstat (limited to 'actionpack/lib/action_controller/caching/pages.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching/pages.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/caching/pages.rb b/actionpack/lib/action_controller/caching/pages.rb index 21a424e6f0..20df3a1a69 100644 --- a/actionpack/lib/action_controller/caching/pages.rb +++ b/actionpack/lib/action_controller/caching/pages.rb @@ -44,8 +44,8 @@ module ActionController #:nodoc: # For Rails, this directory has already been set to Rails.public_path (which is usually set to <tt>Rails.root + "/public"</tt>). Changing # this setting can be useful to avoid naming conflicts with files in <tt>public/</tt>, but doing so will likely require configuring your # web server to look in the new location for cached files. - @@page_cache_directory = '' - cattr_accessor :page_cache_directory + singleton_class.delegate :page_cache_directory, :page_cache_directory=, :to => :config + self.page_cache_directory = '' ## # :singleton-method: @@ -53,8 +53,8 @@ module ActionController #:nodoc: # order to make it easy for the cached files to be picked up properly by the web server. By default, this cache extension is <tt>.html</tt>. # If you want something else, like <tt>.php</tt> or <tt>.shtml</tt>, just set Base.page_cache_extension. In cases where a request already has an # extension, such as <tt>.xml</tt> or <tt>.rss</tt>, page caching will not add an extension. This allows it to work well with RESTful apps. - @@page_cache_extension = '.html' - cattr_accessor :page_cache_extension + singleton_class.delegate :page_cache_extension, :page_cache_extension=, :to => :config + self.page_cache_extension = '.html' end module ClassMethods @@ -116,7 +116,7 @@ module ActionController #:nodoc: # Expires the page that was cached with the +options+ as a key. Example: # expire_page :controller => "lists", :action => "show" def expire_page(options = {}) - return unless perform_caching + return unless self.class.perform_caching if options.is_a?(Hash) if options[:action].is_a?(Array) @@ -135,7 +135,7 @@ module ActionController #:nodoc: # If no options are provided, the requested url is used. Example: # cache_page "I'm the cached content", :controller => "lists", :action => "show" def cache_page(content = nil, options = nil) - return unless perform_caching && caching_allowed + return unless self.class.perform_caching && caching_allowed path = case options when Hash |