Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: tagged-docs
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (15 sloc) 0.5 kB
require 'active_support/deprecation/proxy_wrappers'
module Rails
class DeprecatedConstant < ActiveSupport::Deprecation::DeprecatedConstantProxy
def self.deprecate(old, current)
# double assignment is used to avoid "assigned but unused variable" warning
constant = constant = new(old, current)
eval "::#{old} = constant"
end
private
def target
::Kernel.eval @new_const.to_s
end
end
DeprecatedConstant.deprecate('RAILS_CACHE', '::Rails.cache')
end
Jump to Line
Something went wrong with that request. Please try again.