mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
responders
1.x won't do it. Told you to RTFM for details!
This commit is contained in:
parent
a5e2d2ef85
commit
a485633b16
2 changed files with 8 additions and 3 deletions
|
@ -9,15 +9,18 @@ module ActionController #:nodoc:
|
||||||
def respond_to(*)
|
def respond_to(*)
|
||||||
raise NoMethodError, "The controller-level `respond_to' feature has " \
|
raise NoMethodError, "The controller-level `respond_to' feature has " \
|
||||||
"been extracted to the `responders` gem. Add it to your Gemfile to " \
|
"been extracted to the `responders` gem. Add it to your Gemfile to " \
|
||||||
"continue using this feature. Consult the Rails upgrade guide for " \
|
"continue using this feature:\n" \
|
||||||
"details."
|
" gem 'responders', '~> 2.0'\n" \
|
||||||
|
"Consult the Rails upgrade guide for details."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def respond_with(*)
|
def respond_with(*)
|
||||||
raise NoMethodError, "The `respond_with' feature has been extracted " \
|
raise NoMethodError, "The `respond_with' feature has been extracted " \
|
||||||
"to the `responders` gem. Add it to your Gemfile to continue using " \
|
"to the `responders` gem. Add it to your Gemfile to continue using " \
|
||||||
"this feature. Consult the Rails upgrade guide for details."
|
"this feature:\n" \
|
||||||
|
" gem 'responders', '~> 2.0'\n" \
|
||||||
|
"Consult the Rails upgrade guide for details."
|
||||||
end
|
end
|
||||||
|
|
||||||
# Without web-service support, an action which collects the data for displaying a list of people
|
# Without web-service support, an action which collects the data for displaying a list of people
|
||||||
|
|
|
@ -10,6 +10,7 @@ class ResponderTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_includes e.message, '`responders` gem'
|
assert_includes e.message, '`responders` gem'
|
||||||
|
assert_includes e.message, '~> 2.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_respond_with
|
def test_respond_with
|
||||||
|
@ -26,5 +27,6 @@ class ResponderTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_includes e.message, '`responders` gem'
|
assert_includes e.message, '`responders` gem'
|
||||||
|
assert_includes e.message, '~> 2.0'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue