Class: Rails::DeprecatedConstant

Class Method Summary collapse

Methods inherited from ActiveSupport::Deprecation::DeprecatedConstantProxy

#class, #initialize

Methods inherited from ActiveSupport::Deprecation::DeprecationProxy

#inspect, new

Constructor Details

This class inherits a constructor from ActiveSupport::Deprecation::DeprecatedConstantProxy

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveSupport::Deprecation::DeprecationProxy

Class Method Details

.deprecate(old, current) ⇒ Object


5
6
7
8
9
# File 'railties/lib/rails/deprecation.rb', line 5

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