Deprecation specifies the API used by Rails to deprecate methods, instance variables, objects and constants.


DEFAULT_BEHAVIORS = { raise: ->(message, callstack) { e = DeprecationException.new(message) e.set_backtrace(callstack) raise e }, stderr: ->(message, callstack) { $stderr.puts(message) $stderr.puts callstack.join("\n ") if debug }, log: ->(message, callstack) { logger = if defined?(Rails) && Rails.logger Rails.logger else require 'active_support/logger' ActiveSupport::Logger.new($stderr) end logger.warn message logger.debug callstack.join("\n ") if debug }, notify: ->(message, callstack) { ActiveSupport::Notifications.instrument("deprecation.rails", :message => message, :callstack => callstack) }, silence: ->(message, callstack) {}, }


[RW] deprecation_horizon

The version the deprecated behavior will be removed, by default.

Show files where this module is defined (6 files)
Register or log in to add new notes.