1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove page_cache_extension deprecated method

This commit is contained in:
Francesco Rodriguez 2013-07-01 22:09:11 -05:00
parent 260c2015b3
commit fa45401b82
3 changed files with 4 additions and 25 deletions

View file

@ -1,3 +1,7 @@
* Remove deprecated `page_cache_extension` config.
*Francesco Rodriguez*
* Remove deprecated constants from Action Controller:
ActionController::AbstractRequest => ActionDispatch::Request

View file

@ -58,16 +58,6 @@ module ActionController
config_accessor :default_static_extension
self.default_static_extension ||= '.html'
def self.page_cache_extension=(extension)
ActiveSupport::Deprecation.deprecation_warning(:page_cache_extension, :default_static_extension)
self.default_static_extension = extension
end
def self.page_cache_extension
ActiveSupport::Deprecation.deprecation_warning(:page_cache_extension, :default_static_extension)
default_static_extension
end
config_accessor :perform_caching
self.perform_caching = true if perform_caching.nil?

View file

@ -312,18 +312,3 @@ class ViewCacheDependencyTest < ActionController::TestCase
assert_equal %w(trombone flute), HasDependenciesController.new.view_cache_dependencies
end
end
class DeprecatedPageCacheExtensionTest < ActiveSupport::TestCase
def test_page_cache_extension_binds_default_static_extension
deprecation_behavior = ActiveSupport::Deprecation.behavior
ActiveSupport::Deprecation.behavior = :silence
old_extension = ActionController::Base.default_static_extension
ActionController::Base.page_cache_extension = '.rss'
assert_equal '.rss', ActionController::Base.default_static_extension
ensure
ActiveSupport::Deprecation.behavior = deprecation_behavior
ActionController::Base.default_static_extension = old_extension
end
end