1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove redundant namespaces from sample code of deprecated_method_warning [ci skip]

This commit is contained in:
kenta-s 2017-02-02 19:31:33 +09:00
parent 6e5e8bae22
commit e07ebc13f4

View file

@ -48,11 +48,11 @@ module ActiveSupport
private
# Outputs a deprecation warning message
#
# ActiveSupport::Deprecation.deprecated_method_warning(:method_name)
# deprecated_method_warning(:method_name)
# # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon}"
# ActiveSupport::Deprecation.deprecated_method_warning(:method_name, :another_method)
# deprecated_method_warning(:method_name, :another_method)
# # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (use another_method instead)"
# ActiveSupport::Deprecation.deprecated_method_warning(:method_name, "Optional message")
# deprecated_method_warning(:method_name, "Optional message")
# # => "method_name is deprecated and will be removed from Rails #{deprecation_horizon} (Optional message)"
def deprecated_method_warning(method_name, message = nil)
warning = "#{method_name} is deprecated and will be removed from #{gem_name} #{deprecation_horizon}"