Permalink
Browse files

Remove respond_to/respond_with placeholder methods

This functionality has been extracted to the responders gem.
  • Loading branch information...
carlosantoniodasilva committed Jan 4, 2015
1 parent fc12655 commit afd5e9a7ff0072e482b0b0e8e238d21b070b6280
View
@@ -1,3 +1,8 @@
+* Remove `respond_to`/`respond_with` placeholder methods, this functionality
+ has been extracted to the `responders` gem.
+
+ *Carlos Antonio da Silva*
+
* Remove deprecated assertion files.
*Rafael Mendonça França*
@@ -3,26 +3,6 @@
module ActionController #:nodoc:
module MimeResponds
- extend ActiveSupport::Concern
-
- module ClassMethods
- def respond_to(*)
- raise NoMethodError, "The controller-level `respond_to' feature has " \
- "been extracted to the `responders` gem. Add it to your Gemfile to " \
- "continue using this feature:\n" \
- " gem 'responders', '~> 2.0'\n" \
- "Consult the Rails upgrade guide for details."
- end
- end
-
- def respond_with(*)
- raise NoMethodError, "The `respond_with' feature has been extracted " \
- "to the `responders` gem. Add it to your Gemfile to continue using " \
- "this feature:\n" \
- " gem 'responders', '~> 2.0'\n" \
- "Consult the Rails upgrade guide for details."
- end
-
# Without web-service support, an action which collects the data for displaying a list of people
# might look something like this:
#
@@ -1,32 +0,0 @@
-require 'abstract_unit'
-require 'controller/fake_models'
-
-class ResponderTest < ActionController::TestCase
- def test_class_level_respond_to
- e = assert_raises(NoMethodError) do
- Class.new(ActionController::Base) do
- respond_to :json
- end
- end
-
- assert_includes e.message, '`responders` gem'
- assert_includes e.message, '~> 2.0'
- end
-
- def test_respond_with
- klass = Class.new(ActionController::Base) do
- def index
- respond_with Customer.new("david", 13)
- end
- end
-
- @controller = klass.new
-
- e = assert_raises(NoMethodError) do
- get :index
- end
-
- assert_includes e.message, '`responders` gem'
- assert_includes e.message, '~> 2.0'
- end
-end

1 comment on commit afd5e9a

@bf4

This comment has been minimized.

Show comment
Hide comment
@bf4

bf4 Jul 3, 2016

Contributor

MissingRenderer is still leftover from responders . Should it be removed as well? #22519 (comment)

Contributor

bf4 commented on afd5e9a Jul 3, 2016

MissingRenderer is still leftover from responders . Should it be removed as well? #22519 (comment)

Please sign in to comment.