diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-01-16 11:35:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 11:35:10 -0500 |
commit | ade479f2b5c49c7906f60cec339cb7a8aafd502a (patch) | |
tree | 23e8c8c4bac4158db3ace431b446cd7fcf73b577 /actionpack/lib | |
parent | cf276b344200b7738fe320e4a4d0f555c6ac590e (diff) | |
parent | f19b60b6f7dde934451a31d291869f39364a67cf (diff) | |
download | rails-ade479f2b5c49c7906f60cec339cb7a8aafd502a.tar.gz rails-ade479f2b5c49c7906f60cec339cb7a8aafd502a.tar.bz2 rails-ade479f2b5c49c7906f60cec339cb7a8aafd502a.zip |
Merge pull request #34944 from dasch/patch-7
Document that `format.any` can match all formats
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/mime_responds.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index 118da11990..bf5e7a433f 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -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>, |