From 57be2cfa1eb5cf04c86f4ab5461f6903df099b98 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 17 Jan 2012 09:29:00 -0200 Subject: Deprecate default_charset= at controller level --- actionpack/lib/action_controller/metal/compatibility.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb index 76292db0b3..21626fde44 100644 --- a/actionpack/lib/action_controller/metal/compatibility.rb +++ b/actionpack/lib/action_controller/metal/compatibility.rb @@ -16,8 +16,10 @@ module ActionController # should be able to handle SCRIPT_NAME self.config.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] - class << self - delegate :default_charset=, :to => "ActionDispatch::Response" + def self.default_charset=(new_charset) + ActiveSupport::Deprecation.warn "Setting default charset at controller level" \ + " is deprecated, please use `config.action_dispatch.default_charset` instead", caller + ActionDispatch::Response.default_charset = new_charset end self.protected_instance_variables = %w( -- cgit v1.2.3