Permalink
Browse files

Merge pull request #17528 from revans/respond_with_doc

[docs] Removed respond_with documentation as it was deprecated and removed from Rails [ci-skip]
  • Loading branch information...
guilleiguaran committed Nov 6, 2014
2 parents 75099a9 + c12fbae commit 8c2c1bccccb3ea1f22503a184429d94193a1d9aa
@@ -135,18 +135,6 @@ def respond_with(*)
#
# render json: @people
#
# Since this is a common pattern, you can use the class method respond_to
# with the respond_with method to have the same results:
#
# class PeopleController < ApplicationController
# respond_to :html, :xml, :json
#
# def index
# @people = Person.all
# respond_with(@people)
# end
# end
#
# Formats can have different variants.
#
# The request variant is a specialization of the request format, like <tt>:tablet</tt>,
@@ -214,8 +202,8 @@ def respond_with(*)
# format.html.phone # this gets rendered
# end
#
# Be sure to check the documentation of +respond_with+ and
# <tt>ActionController::MimeResponds.respond_to</tt> for more examples.
# Be sure to check the documentation of <tt>ActionController::MimeResponds.respond_to</tt>
# for more examples.
def respond_to(*mimes)
raise ArgumentError, "respond_to takes either types or a block, never both" if mimes.any? && block_given?
@@ -234,8 +222,8 @@ def respond_to(*mimes)
# A container for responses available from the current controller for
# requests for different mime-types sent to a particular action.
#
# The public controller methods +respond_with+ and +respond_to+ may be called
# with a block that is used to define responses to different mime-types, e.g.
# The public controller methods +respond_to+ may be called with a block
# that is used to define responses to different mime-types, e.g.
# for +respond_to+ :
#
# respond_to do |format|
@@ -86,8 +86,7 @@ def self._render_with_renderer_method_name(key)
# end
# end
# To use renderers and their mime types in more concise ways, see
# <tt>ActionController::MimeResponds::ClassMethods.respond_to</tt> and
# <tt>ActionController::MimeResponds#respond_with</tt>
# <tt>ActionController::MimeResponds::ClassMethods.respond_to</tt>
def self.add(key, &block)
define_method(_render_with_renderer_method_name(key), &block)
RENDERERS << key.to_sym

0 comments on commit 8c2c1bc

Please sign in to comment.