Type:
Class
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) {}, }

Default warning behaviors per Rails.env.

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

new

new(deprecation_horizon = '4.2', gem_name = 'Rails') Class Public methods It

2015-06-20 00:00:00