aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-15 23:21:08 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-17 18:07:08 -0200
commit20baeece919629b7e43b86aebb05f8e2af6d19ef (patch)
tree2b3516ccb6f5cdf7571a75d82797b71eb7ca1986 /actionpack/lib/action_controller
parent57f73a6bcf3311262172f1f348a1be614596b41a (diff)
downloadrails-20baeece919629b7e43b86aebb05f8e2af6d19ef.tar.gz
rails-20baeece919629b7e43b86aebb05f8e2af6d19ef.tar.bz2
rails-20baeece919629b7e43b86aebb05f8e2af6d19ef.zip
Add some deprecations for logic being removed in 4.0
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/metal/compatibility.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/compatibility.rb b/actionpack/lib/action_controller/metal/compatibility.rb
index 05dca445a4..76292db0b3 100644
--- a/actionpack/lib/action_controller/metal/compatibility.rb
+++ b/actionpack/lib/action_controller/metal/compatibility.rb
@@ -1,3 +1,5 @@
+require 'active_support/deprecation'
+
module ActionController
module Compatibility
extend ActiveSupport::Concern
@@ -24,13 +26,19 @@ module ActionController
)
def rescue_action(env)
+ ActiveSupport::Deprecation.warn "Calling `rescue_action` is deprecated and will be removed in Rails 4.0.", caller
raise env["action_dispatch.rescue.exception"]
end
end
# For old tests
- def initialize_template_class(*) end
- def assign_shortcuts(*) end
+ def initialize_template_class(*)
+ ActiveSupport::Deprecation.warn "Calling `initialize_template_class` is deprecated and has no effect anymore.", caller
+ end
+
+ def assign_shortcuts(*)
+ ActiveSupport::Deprecation.warn "Calling `assign_shortcuts` is deprecated and has no effect anymore.", caller
+ end
def _normalize_options(options)
options[:text] = nil if options.delete(:nothing) == true
@@ -44,6 +52,9 @@ module ActionController
end
def _handle_method_missing
+ ActiveSupport::Deprecation.warn "Using `method_missing` to handle non" \
+ " existing actions is deprecated and will be removed in Rails 4.0, " \
+ " please use `action_missing` instead.", caller
method_missing(@_action_name.to_sym)
end
@@ -52,6 +63,8 @@ module ActionController
end
def performed?
+ ActiveSupport::Deprecation.warn "Calling `performed?` is deprecated and will " \
+ "be removed in Rails 4.0. Please check for `response_body` presence instead.", caller
response_body
end
end