aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-xactionpack/lib/action_controller/base.rb19
-rw-r--r--actionpack/lib/action_view/base.rb4
-rw-r--r--actionpack/lib/action_view/template_error.rb8
3 files changed, 2 insertions, 29 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index c0c14e55e0..0ee7bf9529 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -1112,25 +1112,6 @@ module ActionController #:nodoc:
@assigns = @_response.template.assigns
@_headers = @_response.headers
-
- assign_deprecated_shortcuts(request, response)
- end
-
- # TODO: assigns cookies headers params request response template
- DEPRECATED_INSTANCE_VARIABLES = %w(cookies flash headers params request response session)
-
- # Gone after 1.2.
- def assign_deprecated_shortcuts(request, response)
- DEPRECATED_INSTANCE_VARIABLES.each do |method|
- var = "@#{method}"
- if instance_variables.include?(var)
- value = instance_variable_get(var)
- unless ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy === value
- raise "Deprecating #{var}, but it's already set to #{value.inspect}! Use the #{method}= writer method instead of setting #{var} directly."
- end
- end
- instance_variable_set var, ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, method)
- end
end
def initialize_current_url
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index d66b43cd68..9956e0fe28 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -157,7 +157,7 @@ module ActionView #:nodoc:
attr_accessor :controller
attr_reader :logger, :response, :headers
- attr_internal(*ActionController::Base::DEPRECATED_INSTANCE_VARIABLES)
+ attr_internal :cookies, :flash, :headers, :params, :request, :response, :session
# Specify trim mode for the ERB compiler. Defaults to '-'.
# See ERB documentation for suitable values.
@@ -555,4 +555,4 @@ module ActionView #:nodoc:
end
end
-require 'action_view/template_error' \ No newline at end of file
+require 'action_view/template_error'
diff --git a/actionpack/lib/action_view/template_error.rb b/actionpack/lib/action_view/template_error.rb
index 546db41f08..34ed50ae9a 100644
--- a/actionpack/lib/action_view/template_error.rb
+++ b/actionpack/lib/action_view/template_error.rb
@@ -10,8 +10,6 @@ module ActionView
@base_path, @assigns, @source, @original_exception =
base_path, assigns.dup, source, original_exception
@file_path = file_path
-
- remove_deprecated_assigns!
end
def message
@@ -82,12 +80,6 @@ module ActionView
end
private
- def remove_deprecated_assigns!
- ActionController::Base::DEPRECATED_INSTANCE_VARIABLES.each do |ivar|
- @assigns.delete(ivar)
- end
- end
-
def strip_base_path(path)
File.expand_path(path).
gsub(/^#{Regexp.escape File.expand_path(RAILS_ROOT)}/, '').