aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/guides/source/3_2_release_notes.textile8
-rw-r--r--railties/lib/rails/deprecation.rb37
2 files changed, 15 insertions, 30 deletions
diff --git a/railties/guides/source/3_2_release_notes.textile b/railties/guides/source/3_2_release_notes.textile
index 439cd5f714..8b242df179 100644
--- a/railties/guides/source/3_2_release_notes.textile
+++ b/railties/guides/source/3_2_release_notes.textile
@@ -142,6 +142,12 @@ h4. Deprecations
* +Rails::Plugin+ is deprecated and will be removed in Rails 4.0. Instead of adding plugins to +vendor/plugins+ use gems or bundler with path or git dependencies.
+h3. Action Mailer
+
+* Upgraded <tt>mail</tt> version to 2.4.0.
+
+* Removed the old Action Mailer API which was deprecated since Rails 3.0.
+
h3. Action Pack
h4. Action Controller
@@ -284,7 +290,7 @@ h5. Deprecations
* Passing formats or handlers to render :template and friends like <tt>render :template => "foo.html.erb"</tt> is deprecated. Instead, you can provide :handlers and :formats directly as an options: <tt> render :template => "foo", :formats => [:html, :js], :handlers => :erb</tt>.
-h3. Sprockets
+h4. Sprockets
* Adds a configuration option <tt>config.assets.logger</tt> to control Sprockets logging. Set it to +false+ to turn off logging and to +nil+ to default to +Rails.logger+.
diff --git a/railties/lib/rails/deprecation.rb b/railties/lib/rails/deprecation.rb
index 71adcd61f4..c5811b2629 100644
--- a/railties/lib/rails/deprecation.rb
+++ b/railties/lib/rails/deprecation.rb
@@ -1,39 +1,18 @@
-require "active_support/string_inquirer"
-require "active_support/basic_object"
+require 'active_support/deprecation/proxy_wrappers'
module Rails
- module Initializer
- def self.run(&block)
- klass = Class.new(Rails::Application)
- klass.instance_exec(klass.config, &block)
- klass.initialize!
- end
- end
-
- class DeprecatedConstant < ActiveSupport::BasicObject
- def self.deprecate(old, new)
- constant = self.new(old, new)
+ class DeprecatedConstant < ActiveSupport::Deprecation::DeprecatedConstantProxy
+ def self.deprecate(old, current)
+ constant = new(old, current)
eval "::#{old} = constant"
end
- def initialize(old, new)
- @old, @new = old, new
- @target = ::Kernel.eval "proc { #{@new} }"
- @warned = false
- end
-
- def method_missing(meth, *args, &block)
- ::ActiveSupport::Deprecation.warn("#{@old} is deprecated. Please use #{@new}") unless @warned
- @warned = true
+ private
- target = @target.call
- if target.respond_to?(meth)
- target.send(meth, *args, &block)
- else
- super
- end
+ def target
+ ::Kernel.eval @new_const.to_s
end
end
- DeprecatedConstant.deprecate("RAILS_CACHE", "::Rails.cache")
+ DeprecatedConstant.deprecate('RAILS_CACHE', '::Rails.cache')
end