aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-06-25 12:51:21 -0500
committerJoshua Peek <josh@joshpeek.com>2009-06-25 12:51:21 -0500
commit7aa730440c2143051b46c0857e637100f9367628 (patch)
treec4bbebe9f81fa8283ea6cac7719acd86cc6233ef
parent97159fad6a69cc0bc6fe504e2063bb98fcf6e42d (diff)
downloadrails-7aa730440c2143051b46c0857e637100f9367628.tar.gz
rails-7aa730440c2143051b46c0857e637100f9367628.tar.bz2
rails-7aa730440c2143051b46c0857e637100f9367628.zip
Remove deprecated implicit ivar assignment
-rw-r--r--actionpack/lib/action_view/render/partials.rb26
-rw-r--r--actionpack/test/controller/render_test.rb7
2 files changed, 0 insertions, 33 deletions
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb
index 87314fff67..a80ffe3c20 100644
--- a/actionpack/lib/action_view/render/partials.rb
+++ b/actionpack/lib/action_view/render/partials.rb
@@ -232,18 +232,6 @@ module ActionView
ensure
@_proc_for_layout = nil
end
-
- def _deprecated_ivar_assign(template)
- if respond_to?(:controller)
- ivar = :"@#{template.variable_name}"
- object =
- if controller.instance_variable_defined?(ivar)
- ActiveSupport::Deprecation::DeprecatedObjectProxy.new(
- controller.instance_variable_get(ivar),
- "#{ivar} will no longer be implicitly assigned to #{template.variable_name}")
- end
- end
- end
def _render_partial_with_layout(layout, options)
if layout
@@ -253,18 +241,6 @@ module ActionView
content = _render_partial(options)
return _render_content_with_layout(content, layout, options[:locals])
end
-
- def _deprecated_ivar_assign(template)
- if respond_to?(:controller)
- ivar = :"@#{template.variable_name}"
- object =
- if controller.instance_variable_defined?(ivar)
- ActiveSupport::Deprecation::DeprecatedObjectProxy.new(
- controller.instance_variable_get(ivar),
- "#{ivar} will no longer be implicitly assigned to #{template.variable_name}")
- end
- end
- end
def _array_like_objects
array_like = [Array]
@@ -290,8 +266,6 @@ module ActionView
end
def _set_locals(object, locals, template, options)
- object ||= _deprecated_ivar_assign(template)
-
locals[:object] = locals[template.variable_name] = object
locals[options[:as]] = object if options[:as]
end
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 9934639d21..acb0c895e0 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -1268,13 +1268,6 @@ class RenderTest < ActionController::TestCase
assert_equal "Hola: PratikHola: Amy", @response.body
end
- def test_partial_with_implicit_local_assignment
- assert_deprecated do
- get :partial_with_implicit_local_assignment
- assert_equal "Hello: Marcel", @response.body
- end
- end
-
def test_render_missing_partial_template
assert_raise(ActionView::MissingTemplate) do
get :missing_partial