diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-08-17 11:54:09 -0700 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-08-17 11:54:09 -0700 |
commit | 24226c51f075ed8d8e721cdefb6d2661c0a1f53a (patch) | |
tree | cc2dd2e420755a2991fcd44c0a2993d6092e99f3 /actionpack/lib/action_controller | |
parent | 69ed422a9c534224eb818636d79d4263e2abd0a2 (diff) | |
download | rails-24226c51f075ed8d8e721cdefb6d2661c0a1f53a.tar.gz rails-24226c51f075ed8d8e721cdefb6d2661c0a1f53a.tar.bz2 rails-24226c51f075ed8d8e721cdefb6d2661c0a1f53a.zip |
Raise a more helpful error for people who are using these extracted features
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/mime_responds.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index a533f03b6d..f5565947aa 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -5,6 +5,21 @@ 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 `responder` gem. Add it to your Gemfile to " \ + "continue using this feature. Consult the Rails upgrade guide for " \ + "details." + end + end + + def respond_with(*) + raise NoMethodError, "The `respond_with' feature has been extracted " \ + "to the `responder` gem. Add it to your Gemfile to continue using " \ + "this feature. 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: # @@ -165,7 +180,7 @@ module ActionController #:nodoc: # format.html.phone { redirect_to progress_path } # format.html.none { render "trash" } # end - # + # # Variants also support common `any`/`all` block that formats have. # # It works for both inline: |