Merge pull request #34944 from dasch/patch-7

Document that `format.any` can match all formats
This commit is contained in:
Rafael França 2019-01-16 11:35:10 -05:00 committed by GitHub
commit ade479f2b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -124,6 +124,14 @@ module ActionController #:nodoc:
#
# render json: @people
#
# +any+ can also be used with no arguments, in which case it will be used for any format requested by
# the user:
#
# respond_to do |format|
# format.html
# format.any { redirect_to support_path }
# end
#
# Formats can have different variants.
#
# The request variant is a specialization of the request format, like <tt>:tablet</tt>,