diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index 591f881a53f9faff510c98fcec4831300aa95b2c..ac1f2092327af937081f562a89b70a9967b12eca 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -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 :tablet, @@ -214,8 +202,8 @@ def respond_with(*) # format.html.phone # this gets rendered # end # - # Be sure to check the documentation of +respond_with+ and - # ActionController::MimeResponds.respond_to for more examples. + # Be sure to check the documentation of ActionController::MimeResponds.respond_to + # 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| diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb index bc94536c8c9673af8b3df3306012a385fbfc4c5c..45d3962494fb14a48a9f2d2b7301f3b6ee0ebe00 100644 --- a/actionpack/lib/action_controller/metal/renderers.rb +++ b/actionpack/lib/action_controller/metal/renderers.rb @@ -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 - # ActionController::MimeResponds::ClassMethods.respond_to and - # ActionController::MimeResponds#respond_with + # ActionController::MimeResponds::ClassMethods.respond_to def self.add(key, &block) define_method(_render_with_renderer_method_name(key), &block) RENDERERS << key.to_sym