提交 a9231d56 编写于 作者: J Jon Moss 提交者: GitHub

Merge pull request #28016 from kenta-s/fix-docs-of-deprecated_method_warning

Remove redundant namespaces from sample code of `deprecated_method_wa…
......@@ -48,11 +48,11 @@ def deprecation_warning(deprecated_method_name, message = nil, caller_backtrace
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}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册